Recursive data structure
A recursive data structure is a structure whose definition directly or indirectly refers to another instance of the same structure.
Functional Design and Architecture: Examples in Haskell
A recursive data type is a type whose definition refers to itself, allowing it to represent recursively structured values.
- How it is used
- Models domain values and computation chains whose depth is not fixed in advance.
- How deep it goes
- Explains recursive constructors through lists and Free, including recursive mapping and the type-growth problem.
- Examples
- Uses person lists, recursive `fmap`, and sandwich-action scripts with the `Free` type.
- What you can do after
- Evaluate/understand how self-referential constructors represent variable-depth values and keep chained scripts uniformly typed.
Read how Functional Design and Architecture: Examples in Haskell explains recursive data structure →
Elixir in Action, Third Edition
A recursive data structure is a structure whose elements or parts can contain structures of the same form.
- How it is used
- Explains list representation and performance trade-offs before applying head-tail pattern matching.
- How deep it goes
- Explains internal head-tail construction, constant-time access, linear updates, and improper-list boundaries.
- Examples
- Uses nested cons-style expressions, head-tail matches, list updates, concatenation, and a recursive list diagram.
- What you can do after
- Apply Elixir head-tail syntax to construct, decompose, and reason about list access and update costs.
Read how Elixir in Action, Third Edition explains recursive data structure →
Related concepts
- Boxaddressed by · Box is a Rust owning smart pointer that provides indirection by storing a uniquely owned value in heap-allocated memory.
- listincludes · A list is an ordered collection of elements arranged in a sequence.
- recursionaddressed by · Recursion is a computational technique in which a definition or procedure refers to or invokes the same definition or procedure, directly or indirectly.
- token treeincludes · A token tree is a recursive Rust macro syntax structure consisting of tokens and nested delimited sequences of tokens.
- free monadincludes · A free monad represents computations as composable syntax over an operation set, with interpretation and execution supplied separately.
- binary search treeimplements · A binary search tree is a binary tree whose nodes follow an ordering relation placing keys in designated left and right subtrees relative to each node.
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.

