Pure functional data structure
A pure functional data structure is immutable, so its operations produce new values without modifying existing ones.
Functional Programming in Scala, Second Edition
A purely functional data structure is an immutable data structure whose operations produce new values without mutating existing ones.
- How it is used
- Uses immutable lists to demonstrate pure operations, recursive processing, pattern matching, and data sharing.
- How deep it goes
- Defines immutable lists, sharing, persistence, and operation costs, but defers broader efficient functional data-structure designs.
- Examples
- Uses Scala singly linked lists with Nil and Cons, including tail, setHead, init, append, map, filter, and flatMap.
- What you can do after
- Build immutable lists and pure recursive operations while reasoning about sharing, persistence, and copying costs.
Read how Functional Programming in Scala, Second Edition explains pure functional data structure →
Elixir in Action, Third Edition
A pure functional data structure is an immutable data structure whose operations produce new values without modifying existing values.
- How it is used
- Separates immutable data modeling from process-based state management in concurrent systems.
- How deep it goes
- Explains benefits and process integration, but defers the underlying TodoList implementation details.
- Examples
- Uses a TodoList with chained additions, date queries, and a TodoServer that delegates requests.
- What you can do after
- Build it from scratch as an immutable data layer behind a stateful process API.
Read how Elixir in Action, Third Edition explains pure functional data structure →
Related concepts
- pure functionuses · A pure function is a function whose output is determined solely by its explicit inputs and whose evaluation has no externally observable side effects.
- persistent data structurekind of · A persistent data structure preserves access to previous versions because updates create new versions without modifying existing ones.
- linked listincludes · An ordered sequence of elements stored in separate nodes connected by links or references rather than in one contiguous storage region.
- 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.
- persistent vectorincludes · A persistent vector is an immutable indexed sequence whose updates preserve earlier versions, typically through structural sharing.
- server processused by · A server process is a concurrent process that encapsulates private state and communicates with other processes through messages.
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.

