This is a little description of the "iterator" concept as it appeared in the CLU progamming language. Unfortunately, iterators have never appeared in popular programming languages (apart from Ruby, if that counts as popular), despite being relatively straightforward to implement and light on implications for other parts of the language. An iterator is essentially a function which returns multiple times. Instead of "return"ing values, it would "yield" values. In CLU, an example iterator function might look like: % Yield odd numbers from 1 to n odds = iter(n:int) yields int i:int i = 1 while i < n do yield i i := i + 2 end end odds CLU had a kind of weird syntax only marginally reminiscent of more popular anguages, but you can see the essential elements: the function yields more than one value, and execution of the function continues (though not immediately) after a yield. Obviously, you can't use its return value like a regular value; you have to use it in a loop. An invocation might look something like this: for i:int in odds(13) do print int$unparse(i) || "\n" end Execution of the function will alternate between the iterator odds() and the body of the for loop. (You could imagine a syntax for explicitly getting the first and next value of an interator invocation, which would be more flexible but much trickier to implement.) Without iterators, programmers who want to model a sequence of values have to either create a list of all the values (which is inefficient if there are many values) or encapsulate the state of the iteration in a new data type and write functions to initialize and separately perform each step the iteration. Such state is often more complicated than it appears in an iterator, because an iterator gets to keep state in the program counter. For instance, an iterator for the valid moves at a given chess position could yield first the pawn moves, then the knight moves, and so on; the equivalent state in a more traditional programming language would have to include where you were in that sequence as well as which piece you were considering and which of that piece's moves had already been yielded. A notable, though not fatal, downside of CLU-style iterators is that you can't have multiple iterators going on at once unless they're nested. The reason for this has to do with how iterators are implemented on a stack-based platform: when the iterator yields a value, its stack frame remains present and the caller begins using stack slots from the next position on the stack. When the iterator completes, its stack frame can be recovered. This trick works fine for nested iterators but not for multiple interleaved ones.