Re: Argument order for calling f in stream-fold and stream-fold-right Marc Nieper-Wißkirchen (11 Sep 2020 21:07 UTC)
Re: Argument order for calling f in stream-fold and stream-fold-right Marc Nieper-Wißkirchen (12 Sep 2020 07:02 UTC)
Re: Argument order for calling f in stream-fold and stream-fold-right Marc Nieper-Wißkirchen (12 Sep 2020 21:11 UTC)

Re: Argument order for calling f in stream-fold and stream-fold-right Marc Nieper-Wißkirchen 12 Sep 2020 07:02 UTC

So, SRFI 41's fold does it "the right way" (as opposed to SRFI 1's
fold). Why where you interested?

Am Sa., 12. Sept. 2020 um 00:26 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>
> Ok, thanks.
>
> On Fri, Sep 11, 2020 at 5:06 PM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
>>
>> According to the documentation of SRFI 41, the state is first when
>> calling f in stream-fold, yes. But we should extend it to more than
>> one stream, of which one has to be finite.
>>
>> stream-fold-right is not provided in the API (the reason is given in
>> SRFI 41), but in one example in SRFI 41. In the example code, it is
>> called with the state (or should I call it "costate" :)) as the second
>> argument.
>>
>> Am Fr., 11. Sept. 2020 um 23:00 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>> >
>> > Can someone do an analysis of stream-fold and stream-fold-right to say whether what the order of arguments in f is?  I am pretty sure the state is called first in stream-fold(-left), but I am uncertain about stream-fold-right.