On Mon, Sep 7, 2009 at 1:23 PM, Ray Dillinger <[email protected]> wrote:

> 2009/9/5 John Cowan <[email protected]>:
>
> > (Almost.  A continuation has to check how many arguments it expects
> > at run time, because there's no way in Scheme to declare the number
> > of values that a procedure returns.  I argued for (lambda 2 (a b c)
> > (values a b)), but Felix said it was too ugly.)
>
> It would be a better expression than we have now, but it would still
> inject bindings for return values a and b into the calling
> environment, breaking lexical scope.
>
> If lexical scope is to be preserved, then the call site rather than
> the function has to bind the values to be recieved from the function
> (as in the receive form).  But if first-class functions are to be
> preserved, then the number of returns is a property of the function
> and not a property of the call site.
>
>
How is this any different than the fact that a lambda form determines
how many arguments it will accept but the number it is actually
given is determined by the call site?

Lynn
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to