chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] wrong number of arguments to continuation when escap


From: felix . winkelmann
Subject: Re: [Chicken-users] wrong number of arguments to continuation when escaping?
Date: Thu, 18 Jul 2019 09:29:33 +0200

> On Thu, Jul 18, 2019 at 08:13:53AM +0200, Marco Maggi wrote:
> > Not sure if I understand.  The problem  lies in the context in which the
> > call to DOIT is performed?
>
> Yes, exactly.
>
> > it expects any number of values in:
> >
> >    (call-with-values
> >        doit
> >      (lambda args (apply values args)))
> >
> > so no error?
>
> Right.  call-with-values sets up a different type of continuation,
> one that accepts an arbitrary number of values.  Standard continuations
> allow only one argument.
>

See also R5RS and R7RS. R5RS only accepts multiple values in
a context created by call-with-values (this is currently what CHICKEN
does, modulo some places where it is easy to be more lax).

R7RS explicitly allows a mismatch in the number of values in
the non-final position of expression sequences created by
"begin", "let", etc.


felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]