Persistent list
A persistent list is an immutable ordered list whose updates produce new versions while preserving earlier versions, typically through structural sharing.
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
- reversingproduced by · Reversing is an operation that produces a sequence's elements in the opposite order, either by modifying the source or returning a reversed sequence.
- listproduced by · A list is an ordered collection of elements arranged in a sequence.
- persistent data structurekind of · A persistent data structure preserves access to previous versions because updates create new versions without modifying existing ones.
- linked listkind of · An ordered sequence of elements stored in separate nodes connected by links or references rather than in one contiguous storage region.
- branching factorconfigures · A branching factor is the number of successor nodes or choices available from a node, commonly represented by a maximum or average value.
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.

