Persistent data structure
A persistent data structure preserves access to previous versions because updates create new versions without modifying existing ones.
Data-Oriented Programming: Reduce software complexity
A persistent data structure is an immutable data structure whose previous versions remain available after updates, typically through structural sharing.
- How it is used
- Deploys immutable, shareable state when manual immutability becomes unsafe or inefficient at scale.
- How deep it goes
- Explains safety, APIs, structural sharing, tree efficiency, and language integration, but leaves detailed internals to implementation knowledge.
- Examples
- Demonstrates shared books data, linked-list versions, Paguro collections, Immutable.js maps, and nested structural diffs.
- What you can do after
- Apply it via Immutable.js or Paguro to preserve versions, prevent mutation, and update large collections through structural sharing.
Read how Data-Oriented Programming: Reduce software complexity explains persistent data structure →
Fabulous Adventures in Data Structures and Algorithms
Persistence is a data-structure technique that preserves previous versions when updates create new versions.
- How it is used
- Preserves old and updated versions while reducing the memory cost of keeping both.
- How deep it goes
- Develops sharing through C# stack and deque implementations, including allocation costs and an amortization caveat.
- Examples
- Uses branching stacks, a copying-prone deque, and an undoable queue to expose sharing and its limits.
- What you can do after
- Build it from scratch using shared immutable stack tails and chunked deque updates, then assess their allocation costs.
Read how Fabulous Adventures in Data Structures and Algorithms explains persistent data structure →
Clojure: The Essential Reference
A persistent data structure is an immutable collection that preserves prior versions when updated, typically through structural sharing.
- How it is used
- Supports Clojure’s collection operations and provides a default foundation for concurrency without routine explicit locking.
- How deep it goes
- Defines immutability and demonstrates concrete collection contracts, but stops short of explaining implementation internals such as structural sharing.
- Examples
- Uses seq views, array-map construction and promotion, metadata cloning, and concurrent-state examples.
- What you can do after
- Apply it via Clojure collections to retain earlier values while producing updated maps, sequences, sets, or vectors.
Read how Clojure: The Essential Reference explains persistent data structure →
Related concepts
- structural sharinguses · Structural sharing is a technique in which multiple data-structure versions reuse unchanged internal portions instead of copying them.
- immutable collectioncontrasts with · An immutable collection is a collection whose membership and contents cannot be changed after creation.
- pure functional data structureincludes · A pure functional data structure is immutable, so its operations produce new values without modifying existing ones.
- Clojureused by · Clojure is a dynamically typed functional Lisp-family programming language hosted primarily on the Java Virtual Machine.
- hash array mapped trieuses · A hash array mapped trie is a shallow bit-mapped tree structure that supports associative operations by partitioning hash bits across trie levels.
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.


