liveBook · Manning

Pure functional data structure

A pure functional data structure is immutable, so its operations produce new values without modifying existing ones.

How 2 Manning books explain it

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

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.