liveBook · Manning

Persistent list

A persistent list is an immutable ordered list whose updates produce new versions while preserving earlier versions, typically through structural sharing.

How 2 Manning books explain it

Data-Oriented Programming: Reduce software complexity

A persistent list is an immutable list whose earlier versions remain available after elements are added or updated.

How it is used
Uses immutable versions and structural sharing to create and manipulate large collections without copying all their elements.
How deep it goes
Explains tree depth, branching factor, operation counts, and practical performance, then stops short of implementation code.
Examples
Uses 25,000-element copying, 100,000-element lists, repeated splitting, and branching factors of 2 and 32.
What you can do after
Evaluate persistent-list performance by relating access and update costs to tree depth and branching factor.

Read how Data-Oriented Programming: Reduce software complexity explains persistent list →

Clojure: The Essential Reference

clojure.lang.PersistentList is Clojure's immutable persistent singly linked-list implementation.

How it is used
Uses linked head insertion for language forms, stacks, reversal, and selected sequence-processing algorithms.
How deep it goes
Explains construction, head insertion, stack operations, reversal, exceptions, and linked-list representation, with performance details deferred for reverse.
Examples
Demonstrates head insertion, collection reversal, nearest-smaller search, DNA reverse-complement processing, and delimiter checking.
What you can do after
Build it from scratch with list, conj, into, peek, and pop to implement reversal and last-in-first-out processing.

Read how Clojure: The Essential Reference explains persistent list →

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.