Re: make json-stream-read a fold-like operation? Amirouche Boubekki 21 Jan 2020 10:40 UTC

Le lun. 20 janv. 2020 à 15:18, John Cowan <> a écrit :
> On Mon, Jan 20, 2020 at 4:48 AM Duy Nguyen <> wrote:
>> Is it possible to make 'proc' in json-stream-read take a third, opaque
>> object, and pass proc's result to the next 'proc' call?
>> json-stream-read returns the result of the last 'proc' call.
>> I think by chaining these proc calls together, json-stream-read user
>> can pass parsing state along and can even avoid mutable states if they
>> want to. I haven't looked at the implementation though so I don't know
>> how hard to do it.

That occured to me but I am wondering whether it would not be better
to make json-stream-read (possibly with a new name) return a