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.
McGraw-Hill Dictionary of Scientific & Technical Terms, 6E, Copyright © 2003 by The McGraw-Hill Companies, Inc.

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.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)

recursion

In programming, the ability of a subroutine or program module to call itself. Recursion 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.
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.