liveBook · Manning

Persistent data structure

A persistent data structure preserves access to previous versions because updates create new versions without modifying existing ones.

How 3 Manning books explain it

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

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.