recursion

(redirected from Recursion definition)
Also found in: Dictionary, Thesaurus.

recursion

[ri′kər·zhən]
(computer science)
A technique in which an apparently circular process is used to perform an iterative process.

recursion

(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.

recursion

In programming, the ability of a subroutine or program module to call itself. It is used to write routines that solve problems by repeatedly processing the output of the same process. See recurse subdirectories, circular reference and recursive descent parser.
References in classic literature ?
Latrobe, one of the judges, "was in selecting from the rich contents of the volume.
D'Urberville began gathering specimens of the fruit for her, handing them back to her as he stooped; and, presently, selecting a specially fine product of the "British Queen" variety, he stood up and held it by the stem to her mouth.
And he understood for the first time the earnestness with which May, who was incapable of tying a ribbon in her hair to charm him, had gone through the solemn rite of selecting and ordering her extensive wardrobe.
He sends--I really beg your pardon--he sends," says Sir Leicester, selecting the letter and unfolding it, "a message to you.
He trusted, however, that an opportunity might ere long occur of selecting one -- though not for himself.
People in Europe desiring to join the excursion--contagious sickness to be avoided--boating at the expense of the ship--physician on board--the circuit of the globe to be made if the passengers unanimously desired it--the company to be rigidly selected by a pitiless "Committee on Applications"--the vessel to be as rigidly selected by as pitiless a "Committee on Selecting Steamer.
In the vast warp of life (a river arising from no spring and flowing endlessly to no sea), with the background to his fancies that there was no meaning and that nothing was important, a man might get a personal satisfaction in selecting the various strands that worked out the pattern.
Accordingly, it is a truth everywhere in evidence that strong people, masculine or feminine, not only do not marry stronger people, but do not show any preference for them in selecting their friends.
They entertained the notion for a time of selecting the two worst machines from the hiring-stock, painting them over with crimson enamel paint, replacing the bells by the loudest sort of motor-horn, and doing a ride about to begin and end the entertainment.
He came to a dead stop, a yard from our step, and, leaning up against the railings, and selecting a straw to chew, fixed us with his eye.