iterator
Sign in to saveIn computer programming, an iterator is an object that progressively provides access to each item of a collection, in order.
~35 min read
Encyclopedic overview
23 sectionsContents
- Pattern
- Generator
- Internal iterator
- Implicit iterator
- Stream
- Contrast with indexing
- Classification
- Categories
- Types
- In different programming languages
- .NET
- C
- C++
- Java
- Scala
- MATLAB
- PHP
- Raku
- Ruby
- Rust
- See also
- References
- External links
In computer programming, an iterator is an object that progressively provides access to each item of a collection, in order.
A collection may provide multiple iterators via its interface that provide items in different orders, such as forwards and backwards.
Excerpted from Wikipedia’s “iterator” article, available under the CC BY-SA 4.0 licence.