iterators

Collection navigation objects

Iterators are programming constructs that step through elements in a collection one at a time—traversing a list, array, or other data structure without exposing its underlying implementation.

The term comes from iterate, meaning to repeat.

An iterator keeps track of position, returning the next item on each call until the sequence is exhausted: The loop uses an iterator to process each record.

programming

loop

Curve closing on itself

generator · enumerate · next · collection · iterable · index · sequence · array · list · Python

mathematical

sequence

Ordered succession of elements

set theory · cardinality · infinite · finite · ordinal · successor · enumeration · induction · convergence · series

design-pattern

behavioral

Relating to conduct

container · decoupling · polymorphism · composition · internal · external · robust · snapshot · concurrent · bidirectional

Categories
Opposites
access pattern

iteratorsrandom access

Instant reach to any location

batch processing

data relationship

iteratorscontainers

Objects for holding things

collections · data structures · arrays · lists · vectors

data flow direction

iteratorsgenerators

Devices converting motion to electricity

producers · emitters · publishers · data sources

Family

iterator

Familiarity
Top 500,000
Profile
Used worldwide · Timeless · Abstract · Rated G