Infinite data structure
An infinite data structure is a structure representing an unbounded number of elements, whether stored or generated on demand.
Clojure: The Essential Reference
An infinite sequence is a sequence with unboundedly many elements, typically generated on demand.
- How it is used
- Supplies unbounded inputs for sequential processing, evolving states, and on-demand work generation.
- How deep it goes
- Defines generator contracts and exceptions, works through stateful examples, and demonstrates memory and performance consequences of laziness.
- Examples
- Demonstrates Fibonacci pairs, a pi approximation, Game of Life states, random values, and lazy worker batches.
- What you can do after
- Build it from scratch with lazy-seq and cons, or apply it via iterate to generate and consume successive states.
Read how Clojure: The Essential Reference explains infinite data structure →
Learn Haskell by Example
An infinite list is a lazily generated list with no finite endpoint whose finite prefixes can be evaluated on demand.
- How it is used
- Builds reusable signal-processing curves without calculating their lengths in advance.
- How deep it goes
- Explains lazy generation, safe finite-demand operations, recursive definitions, range syntax, and the failure of full evaluation.
- Examples
- Demonstrates recursive ones, natural and odd-number ranges, repeat, finite zipping, and an ADSR audio envelope.
- What you can do after
- Apply it via take, repeat, range syntax, zipWith, and zipWith3 while avoiding operations that demand complete evaluation.
Read how Learn Haskell by Example explains infinite data structure →
Also covered in
- Logs and Telemetry
- Graph Algorithms for Data Science
- The Well-Grounded Rubyist, Fourth Edition
- Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond
- Akka in Action, Second Edition
What to know first
- functionA function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
Related concepts
- iterateproduced by · Iterate is an operation that advances through successive values or states according to specified functions or iteration rules.
- cycleproduced by · cycle is an iterator operation that produces the elements of a finite source sequence repeatedly, either indefinitely or for a specified number of repetitions.
- repeatproduced by · repeat is a function that produces a sequence containing repeated copies of a value, either finitely or indefinitely.
- data sourcekind of · A data source is an origin, system, repository, or process from which data is obtained or made available for use or processing.
Questions about infinite data structure
What is infinite data structure?
An infinite data structure is a structure representing an unbounded number of elements, whether stored or generated on demand.
Which Manning books explain infinite data structure?
Clojure: The Essential Reference and Learn Haskell by Example.
What should I know before learning infinite data structure?
Manning books that teach infinite data structure usually introduce function first.
What is infinite data structure a kind of?
Infinite data structure is a kind of data source. A data source is an origin, system, repository, or process from which data is obtained or made available for use or processing.
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.

