Content deleted Content added
m General fixes and Typo fixing, typo(s) fixed: For example → For example,, a infinite → an infinite using AWB |
|||
Line 3:
{{Refimprove|date=July 2007}}
In [[computer science]], a '''generator''' is a special [[subroutine|routine]] that can be used to control the [[iteration]] behaviour of a [[control flow#Loops|loop]]. In fact, all generators are [[iterator]]s.<ref>
Generators can be implemented in terms of more expressive [[control flow]] constructs, such as [[coroutine]]s or first-class [[continuation]]s.<ref>{{cite web
Line 11:
| title = General ways to traverse collections in Scheme
| url = http://okmij.org/ftp/Scheme/enumerators-callcc.html
}}</ref> Generators, also known as semicoroutines,<ref name="Ralston2000">{{cite book|author=Anthony Ralston|title=Encyclopedia of computer science|url=
==Uses==
|