No, this is not legal. See R5RS 6.4:
"Except for continuations created by the call-with-values procedure,
all continuations take exactly one value. The effect of passing no
value or more than one value to continuations that were not created by
call-with-values is unspecified."
The existing macro RECEIVE will do what you want, though:
(receive (values 1 2)) ; => '(1 2)
On 8/9/06, Dan <address@hidden> wrote:
> (define (values->list v)
> (call-with-values
> (lambda () v)
> (lambda x x)))
>
> (values->list (values 1 2))
>
> Returns (1 2) in SISC and Guile, (1) in Chicken. Are
> values supposed to be 1st-class objects? If not, I'll
> have to rewrite values->list as a macro -- right?