
17 Sep
2021
17 Sep
'21
3:19 a.m.
On Fri, Sep 17, 2021 at 01:57:58AM -0400, Viktor Dukhovni wrote:
Laziness makes it it possible to use folds as coroutines that lazily yield a sequence of values. This is not possible in strict languages, where you'd need explicit support for coroutines (generators) via something like a "yield" primitive.
Wouldn't an explicit thunk datatype (that takes a lambda as a "constructor") be sufficient? I can't see why going all the way to coroutines would be required. Tom