Fri Apr 17 11:09:46 CEST 2009
Multiple values and sequences
For lazy lists, it's not possible (by their definition: linked cons
cells contain only a single value in the CAR position).
PLT's sequences (which are generators) do support them.
As mentioned before: the problem with multiple values is channeling
the end-of-sequence value and the multiple values through the same
channel. The scheme's sequence api has different functions for these.
The simplest solution seems to be to:
- stick with lazy lists as basic abstraction.
- use an "unpacking" iterator: (in-lazy-list ll values)
I'm adding a form "in-producer" which couples a multiple values
generating body in terms of (yield . args) with a multiple values