рекурсия
рекурсия; циклическое повторение
рекурсия в программировании - способность подпрограммы или функции вызывать во время исполнения саму себя для выполнения итеративной операции. Применение рекурсии требует известной осторожности, так как при слишком большом числе итераций может возникнуть переполнение стека (stack overflow). Различают прямую и косвенную рекурсии Смотри также: recursive call, recursive definition, recursive function, self-recursion Антоним(ы): loop
noun Etymology: Late Latin recursion-, recursio, from recurrere 1. return 1 2. the determination of a succession of elements (as numbers or functions) by operation on one or more preceding elements according to a rule or formula involving a finite number of steps 3. a computer programming technique involving the use of a procedure, subroutine, function, or algorithm that calls itself one or more times until a specified condition is met at which time the rest of each repetition is processed from the last one called to the first — compare iteration
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.