liveBook · Manning

Iterate

Iterate is an operation that advances through successive values or states according to specified functions or iteration rules.

How 2 Manning books explain it

Julia as a Second Language

iterate is Julia's generic function implementing the iteration protocol by returning the next element and iteration state or indicating that iteration is complete.

How it is used
Builds custom iterable collections that work with for loops and collection-processing functions.
How deep it goes
Explains the two required methods, state transitions, termination, Base extension, and the separate need for length.
Examples
Uses engine clusters and multistage rockets to demonstrate indexed and object-based iteration state.
What you can do after
Build it from scratch by extending Base.iterate and returning elements, states, and termination values for a custom type.

Read how Julia as a Second Language explains iterate →

Clojure: The Essential Reference

iterate is a Clojure function that returns an infinite lazy sequence formed by repeatedly applying a unary function to the preceding result.

How it is used
Generates arbitrarily complex lazy sequences for downstream sequential processing.
How deep it goes
Defines inputs, outputs, laziness, side-effect expectations, exceptions, and recursive implementation behavior.
Examples
Demonstrates counting, Fibonacci generation, numerical series, and successive Game of Life states.
What you can do after
Apply it via Clojure sequence consumers to build finite views of infinite numeric or state-dependent processes.

Read how Clojure: The Essential Reference explains iterate →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.