Analysis of information sources in references of the Wikipedia article "Iterador" in Portuguese language version.
You can think of an iterator as pointing to an item that is part of a larger container of items.
A user-defined iterator usually takes the form of a code reference that, when executed, calculates the next item in a list and returns it. When the iterator reaches the end of the list, it returns an agreed-upon value.
Iterators were introduced as constructs to allow looping over abstract data structures without revealing their internal representation.