From: Martin DeMello Date: 2003-01-23T08:21:57+09:00 Subject: Re: Definition: iterator Hal E. Fulton wrote: > I would define it by its operation rather than > its usage -- something like "a method with the > internal capability of calling a code block > associated with the method call, in such a way > that the method and the block trade control > back and forth like coroutines." I'd distinguish iterators from the general case of yield-calling methods, personally. A first approximation to the definition I'd use: A method that takes in a block, and calls it on successive elements of a collection. martin