Trying out let-values, I wanted to return multiple values as the
result, but stumbled upon what is shown below, i.e. that it didn't
seem possible. After a while I realized that I had forgotten to open
the srfi-11 structure, after which let-values allowed me to return
multiple values.
But from where did the first (seemingly limited) let-values come?
Greping through the scsh sources revealed that let-values is only
defined in the relevant srfi package, which as far as I can tell is
not included in the initial SCSH image.
$ scsh
Welcome to scsh 0.6.4 (Olin Shivers)
Type ,? for help.
> (let-values (((a b) (values 1 2))) (values a b))
(let-values (((a b) (values 1 2))) (values a b))
Error: returning several values when only one is expected
(values 1 2)
1>
$ scsh -o srfi-11
Welcome to scsh 0.6.4 (Olin Shivers)
Type ,? for help.
> (let-values (((a b) (values 1 2))) (values a b))
(let-values (((a b) (values 1 2))) (values a b))
; 2 values
1
2
>
|