Re: CL multiple-value-call Marc Nieper-Wißkirchen 31 Aug 2020 06:36 UTC

It will be in the second draft, which should be online soon.

Am So., 30. Aug. 2020 um 23:16 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>
> Excellent, thanks.  I believe that is the last thing keeping us from parity with CL, given R7RS-small + SRFI 210.
>
> On Sun, Aug 30, 2020 at 4:31 AM Marc Nieper-Wißkirchen <xxxxxx@gmail.com> wrote:
>>
>> Am So., 30. Aug. 2020 um 04:48 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>> >
>> > CL has a function (multiple-value-call consumer . producers), which calls then producers, collects all their values in order, and invokes the consumer on them.  In CL this is a primitive so that it can be done without consing anything.  I think something like it would fit into this SRFI as a syntax.
>>
>> Thank you for the suggestion. This SRFI includes apply/mv, which does
>> the same thing (if I understand multiple-value-call correctly) but
>> with the restriction that all but the last producer must evaluate to a
>> single value. This restriction is in place so that a relatively
>> efficient implementation on existing Schemes is possible.
>>
>> However, given CL's multiple-value-call, I would then add
>>
>> (call/mv <consumer> <producer1> ...)
>>
>> to the spec, which extends the domain of apply/mv in the CL sense but
>> may not be as efficient.