Persistent data structure
A persistent data structure preserves access to earlier versions when updates produce new versions rather than 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 →
Also covered in
What to know first
- listA list is an ordered collection of elements arranged in a sequence.
- treeA tree is a connected, acyclic structure of nodes organized through parent-child relationships, typically around a single root.
- immutable collectionAn immutable collection is a collection whose contents cannot be changed after it is created.
Related concepts
- structural sharinguses · Structural sharing is a technique in which multiple data-structure versions reuse unchanged internal components rather than copying them.
- immutable collectioncontrasts with · An immutable collection is a collection whose contents cannot be changed after it is created.
- data structurekind of · A data structure is an organized representation of data and its relationships that supports defined operations for storing, accessing, or modifying it.
- Clojureused by · Clojure is a dynamically typed, functional Lisp-family programming language that runs primarily on the Java Virtual Machine and also supports other platforms.
- 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.
- pure functional data structureincludes · A pure functional data structure is immutable: operations produce new versions while preserving existing ones.
Questions about persistent data structure
What is persistent data structure?
A persistent data structure preserves access to earlier versions when updates produce new versions rather than modifying existing ones.
Which Manning books explain persistent data structure?
Data-Oriented Programming: Reduce software complexity, Fabulous Adventures in Data Structures and Algorithms and Clojure: The Essential Reference.
What should I know before learning persistent data structure?
Manning books that teach persistent data structure usually introduce list, tree, immutable collection and Java first.
What is the difference between persistent data structure and immutable collection?
A persistent data structure preserves access to earlier versions when updates produce new versions rather than modifying existing ones. An immutable collection is a collection whose contents cannot be changed after it is created.
What kinds of persistent data structure are there?
Kinds of persistent data structure include pure functional data structure.
What is persistent data structure a kind of?
Persistent data structure is a kind of data structure. A data structure is an organized representation of data and its relationships that supports defined operations for storing, accessing, or modifying it.
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.


