Content deleted Content added
m r2.6.4) (Robot: Modifying pt:Gerador (ciência da computação) |
→Uses: seq values aren't hard to compute, the wholes are |
||
Line 43:
at which time the innermost loop enclosing the generator invocation is terminated.
Because generators compute their yielded values only on demand, they are useful for representing sequences that
In the presence of generators, loop constructs of a language can be reduced into a single loop ... end loop construct; all the usual loop constructs can then be comfortably simulated by using suitable generators in the right way.
|