[plt-scheme] multiple values question
On Jun 17, Hugh Myers wrote:
> Hi all,
>
> Given a function that returns a list:
>
> (define (f) (list 1 2 3))
>
> How do I marry it up to (define!-values (a b c) ?
(define-values (a b c) (apply values (f)))
or just make `f' return three values.
> p.s. CL has a 'Multiple-value-setq which provides pretty much what I
> need, but that is CL, not scheme...
http://docs.plt-scheme.org/guide/set_.html#(part._.Multiple_.Values__set_-values)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!