3 ms·
So it’s like python’s yield statement aka generators?
by gigatexal 7y ago
So it’s like python’s yield statement aka generators?
- topspin 7y agoIt's more general than generators. You can create generators using it, and also other control flow constructs.
- billsix 7y agoYup, I did exactly that in Scheme http://billsix.github.io/bug#_make_generator http://billsix.github.io/bug#_make_generator
- ufo 7y agoIt seems that these are stackless so there is no distinction between regular functions and generator functions. You can yield from many levels deep in the call stack, without needing to use "yield from"