iterator


iterator

(programming)An object or routine for accessing itemsfrom a list, array or stream one at a time.

By extension, the term can be used for an object or routinefor accesing items from any data structure that can be viewedas a list. For example, a traverser is an iterator fortree-shaped data structures.