TAIL RECURSION


Meaning of TAIL RECURSION in English

< programming > When the last thing a function (or procedure) does is to call itself. Such a function is called tail recursive. A function may make several recursive calls but a call is only tail-recursive if the caller returns immediately after it. E.g.

f n = if n Here the both calls to fib are recursive but only the outer one is tail recursive.

See tail recursion optimisation , and, if you aren't sick of them already, recursion , tail recursion .

[ Jargon File ]

(1996-02-22)

FOLDOC computer English dictionary.      Английский словарь по компьютерам FOLDOC.