Content deleted Content added
m →Uses Tags: Reverted Visual edit |
m Reverted edits by S.Noman_shabbir (talk): addition of unnecessary/inappropriate external links (HG) (3.4.12) |
||
Line 21:
When eager evaluation is desirable (primarily when the sequence is finite, as otherwise evaluation will never terminate), one can either convert to a [[List (abstract data type)|list]], or use a parallel construction that creates a list instead of a generator. For example, in Python a generator <code>g</code> can be evaluated to a list <code>l</code> via <code>l = list(g)</code>, while in [[F Sharp programming language|F#]] the sequence expression <code>seq { ... }</code> evaluates lazily (a generator or sequence) but <code>[ ... ]</code> evaluates eagerly (a list).
In the presence of generators,
==Timeline==
|