WishWiki

Recursion

Recursion is a method where a process, structure, or definition refers back to itself, creating self-similar patterns or self-referential loops. It appears across Mathematics, Computer Science, Biology, and nature itself.

In Computer Science, a function calls itself to solve problems by breaking them into smaller instances of the same problem. This requires a base case (where the recursion stops) and a recursive case (where it calls itself). Evaluation proceeds until the base case is reached, then results "unwind" back up the call stack.

Mathematical structures like composition and Algebraic manipulation use recursion to define sequences or operations: each term builds from previous ones. The Fibonacci sequence is a classic example—each number is the sum of the two before it.

Nature recurses too. Fractals exhibit self-similarity at different scales. Stellar systems, ecosystem dynamics, and even seed development show recursive branching patterns. Temporal processes can loop back, and decisions sometimes depend on outcomes of prior decisions (Path dependence).

Recursion is elegant but carries Cognitive overhead—too much nesting becomes hard to follow. Pascal and early mathematicians formalized recursive thinking, laying groundwork for modern computing.

Related

Function (programming), Loop (programming), Stack (data structure), Fractal, Fixed point (mathematics), Self-reference

Wishing…
your wish is being written

✨ Wish for a new page

👁 Wish for another view of this page

Sign in to WishWiki

Keep your wishes together, see your activity — and later, get your own private wiki space.

⏱ Page history