Tutorial by Topics: enumerators

An Enumerator is an object that implements iteration in a controlled fashion.

Instead of looping until some condition is satisfied, the object enumerates values as needed. Execution of the loop is paused until the next value is requested by the owner of the object.

Enumerators make infinite streams of values possible.

Page 1 of 1