[plt-scheme] call/cc and values

From: pedro pinto (pedro.e.pinto at gmail.com)
Date: Wed Feb 15 17:02:26 EST 2006

Thanks everybody. That was very helpfull.

-pp



On 2/15/06, Carl Eastlund <carl.eastlund at gmail.com> wrote:
>
> On 2/15/06, Jacob Matthews <jacobm at cs.uchicago.edu> wrote:
> > You _can_ get the behavior I suspect you want, but not the way you've
> > done it. You've got to do
> >
> > (let/ec return
> >   (return 1 2))
> >
> > which evaluates to two values, 1 and 2.
>
> Of course, this is what the call-with-values code I wrote boils down
> to, and is the simple way to do things.  Using call-with-values is
> only necessary if you have some arbitrary function call generating
> your multiple values and you can't manually plug them into argument
> position.
>
> --
> Carl Eastlund
> "Cynical, but technically correct."
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20060215/bec4dccd/attachment.html>

Posted on the users mailing list.