Recursive definition
A recursive definition specifies a structure or value in terms of simpler instances of itself, together with cases that terminate the recursion.
Fabulous Adventures in Data Structures and Algorithms
A recursive definition specifies a structure or value in terms of simpler instances of itself together with base cases.
- How it is used
- Defines immutable data structures through base cases and smaller components, guiding their C# representations.
- How deep it goes
- Works through list, deque, and quadtree definitions, then examines nested generic types and an equality-related stack risk.
- Examples
- Uses a C# linked-list record, a deque of minis, four-child quads, and the recurrence for combinations.
- What you can do after
- Build it from scratch: define base and recursive cases for immutable structures while checking representation and performance consequences.
Read how Fabulous Adventures in Data Structures and Algorithms explains recursive definition →
Learn Haskell by Example
A recursive definition is a definition that refers directly or indirectly to itself.
- How it is used
- Uses self-referential definitions to transform lists and build reusable functional programs.
- How deep it goes
- Demonstrates base cases, pattern matching, recursive calls, counters, and local helpers, but stops short of formal recursion theory.
- Examples
- Uses line numbering and proposed implementations of lines, unlines, words, and unwords as concrete examples.
- What you can do after
- Apply recursive definitions to implement list-processing utilities and test their results in GHCi.
Read how Learn Haskell by Example explains recursive definition →
Related concepts
- equalityuses · Equality is a programming-language relation or operation that determines whether two values are considered equal according to applicable rules.
- helper functionuses · A helper function is a reusable supporting function that performs an operation for a larger computation or other code.
- deque of minisuses · A deque of minis is the recursive middle component of this deque representation whose elements are bounded mini-deques.
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.

