External Iterator
nClient controls iteration
n
n
n
n
n
n// This is C++
nList list;
nfor (ListIterator iterator(list);!iterator.IsDone();iterator.Next())
n{
n    Element &element=iterator.CurrentItem();
n    element.Process();
n}
Here is a simple, somewhat more concrete example taken from Design Patterns.  For the List class there is an iterator class called ListIterator, which knows about its list.  It keeps track of an index, which gives the current position in the list.  It returns the element at that index upon request and it knows when all elements have been processed.  The interface is adequate for writing the loop.  This is an external iterator because the client code controls the traversal with iterator.Next().