On a related note, I was wondering how one typically handles the case of a function that returns multiple values, but also needs to signal failure. I can think of a few ways:
1. Returning #f as one of the values, and testing for that; 2. out-of-band -- an exception or continuation to error handling code; 3. using (receive (values ...)) or equivalent call-with-values to get a list or #f, just like if you had returned a list in the first place It makes sense to throw some kind of exception, but this seems exceedingly rare from what I've seen. Returning #f is so much more common. On 5/9/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > In fact, some Schemes relax this somewhat (Chez Scheme, for example > basically has Common-Lisp semantics, IIRC). > Since this can get somewhat inconvenient, I will relax the rules as well: > *implicit* non-multival continuations discard all but the first result value > (so `(let ((foo (values 1 2 3))) ...)' will bind foo to 1.. _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
