[plt-scheme] Question about call-with-values

From: John W. Small (jsmall at atlantech.net)
Date: Wed Oct 30 13:29:51 EST 2002

In the R5RS documentation on page 34 (section 6.4 on
call-with-values) the following example is given.

    (call-with-values (lambda () (values 4 5))
                  (lambda (a b) b))

I can achieve the same effect with

    (apply (lambda (a b) b) ((lambda () '(4 5))))

I'm trying to think of a more complex example where
"apply" couldn't synthesize the call-with-values form
but can't.  Is there something special about call-with-values
that can't be readily achieved with a similar "apply" construct?

Thanks!

John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20021030/a0855d98/attachment.html>

Posted on the users mailing list.