[Prev][Next][Index][Thread]
How do I turn values() into a list?
Hi,
One of my little projects is to write a little package implementing a
lazy evaluation package for Dylan (akin to delay/force in SICP). It's
been easy and fun, except for one niggle: how do I capture an unknown
number of multiple return values into a sequence?
Ideally, I'd like something like this:
listify(values(5,9)) => (5, 9) // a list with two elements
listify(values(1,2,3)) => (1, 2, 3) // a list with 3 elements
listify(values()) => #() // a list with no elements
but I can't figure out how. Any ideas?
Neel
Follow-Ups: