# Recursion

**noun**, Mathematics, Computers.

1.

the process of defining a function or calculating a number by the repeated application of an algorithm.

**noun**

1.

the act or process of returning or running back

2.

(logic, maths) the application of a function to its own values to generate an infinite sequence of values. The recursion formula or clause of a definition specifies the progression from one term to the next, as given the base clause f(0) = 0, f(n + 1) = f(n) + 3 specifies the successive terms of the sequence f(n) = 3n

mathematics, programming

When a function (or procedure) calls itself. Such a function is called “recursive”. If the call is via one or more other functions then this group of functions are called “mutually recursive”.

If a function will always call itself, however it is called, then it will never terminate. Usually however, it first performs some test on its arguments to check for a “base case” – a condition under which it can return a value without calling itself.

The canonical example of a recursive function is factorial:

factorial 0 = 1 factorial n = n * factorial (n-1)

Functional programming languages rely heavily on recursion, using it where a procedural language would use iteration.

See also recursion, recursive definition, tail recursion.

[Jargon File]

(1996-05-11)

Tagged: r

Read Also:

- Recursion-formula
noun, Mathematics. 1. a formula for determining the next term of a sequence from one or more of the preceding terms.

- Recursion theory
theory The study of problems that, in principle, cannot be solved by either computers or humans. [Proper definition?] (1999-03-01)

- Recursive
adjective 1. pertaining to or using a rule or procedure that can be applied repeatedly. 2. Mathematics, Computers. pertaining to or using the mathematical process of recursion: a recursive function; a recursive procedure. recursion

- Recursive acronym
convention A hackish (and especially MIT) tradition is to choose acronyms and abbreviations that refer humorously to themselves or to other acronyms or abbreviations. The classic examples were two MIT editors called EINE (“EINE Is Not Emacs”) and ZWEI (“ZWEI Was EINE Initially”). More recently, there is a Scheme compiler called LIAR (Liar Imitates Apply […]