Generator/Exponential: Difference between revisions
Content deleted Content added
mNo edit summary |
|||
Line 1,751:
=={{header|Lingo}}==
Lingo neither supports coroutines nor first-class functions, and also misses syntactic sugar for implementing real generators. But in the context of traditional for-loops, a peculiarity of Lingo can be used to implement generator-like behavior: in Lingo, the halting condition (b) in a "repeat with i = a to b" loop is not pre-cached, but evaluated in each single step. This behavior can be used - in combination with simple pseudo-generator objects that store states internally - to implement generator like behavior in loops,
<lang Lingo>
|