<mathematics, programming, PI> 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] and [FOLDOC]

<philosophical terminology> capable of being indefinitely re-applied to the results of its own application. Hence, a recursive definition is one that begins with one or more initial instances and then specifies the repeatable rules for deriving others. Thus, for example: "A person's descendants include that person's children and all of their descendants" is a recursive definition (not a circular definition) of the word "descendant". (The compound statements of the propositional calculus and the natural numbers of arithmetic are often defined recursively.) Recommended Reading: Robert L. Causey, Logic, Sets, and Recursion (Jones & Bartlett, 2001); Raymond M. Smullyan, Recursion Theory for Metamathematics (Oxford, 1993); George S. Boolos and Richard D. Jeffrey, Computability and Logic (Cambridge, 1989); and Joseph R. Shoenfield, Recursion Theory (A. K. Peters, 2001).

[A Dictionary of Philosophical Terms and Names]


Try this search on OneLook / Google

Nearby terms: recollection « record « recourse « recursion » recursive » recursive definition » recursive function