Peter Bex wrote:
> On Thu, Jul 18, 2019 at 06:43:06AM +0200, Marco Maggi wrote:
>> I do not understand why some place expects 1 argument. The problem goes
>> away if I replace:
>> (escape)
>> with:
>> (escape 1)
> Hi Marco,
> This is a known "issue", see #1390 and #1601. Improving this so
> that such non-explicit "value" continuations accept different argument
> counts would have a big impact on performance because every single
> continuation would then need to start checking its argument count.
> It's unfortunate, but easy to fix; just use something like "receive"
> or "call-with-values" to explicitly allow the continuation to handle
> multiple values.
Not sure if I understand. The problem lies in the context in which the
call to DOIT is performed? The code expects 1 value from:
(doit)
so error; it expects one value in:
(begin
(doit)
#t)
so error; it expects one value in:
(let ()
(doit)
#f)
so error; it expects any number of values in:
(call-with-values
doit
(lambda args (apply values args)))
so no error?
--
Marco Maggi
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users