Tail recursion optimisation
programming
(TRO) Discarding the calling environment (call stack frame) when the last thing a function or procedure does is to call itself. This is important when a procedure calls itself recursively many times since, without tail recursion optimisation, the environments of earlier invocations would fill up the memory only to be discarded when (if) the last call terminated.
Tail recursion optimisation is a special case of last call optimisation but it allows the further optimisation that some arguments may be passed in situ, possibly in registers. It allows recursive functions to be compiled into iterative loops.
See also conversion to iteration, tail recursion modulo cons.
(2006-04-16)
Read Also:
- Tail rotor
noun 1. a small propeller fitted to the rear of a helicopter to counteract the torque reaction of the main rotor and thus prevent the body of the helicopter from rotating in an opposite direction
- Tails
adjective, adverb 1. (of a coin) with the reverse facing up: On the next toss, the coin came up tails. Compare heads. noun 2. tail1 (def 6). noun 1. the hindmost part of an animal, especially that forming a distinct, flexible appendage to the trunk. 2. something resembling or suggesting this in shape or position: […]
- Tailskid
noun 1. a runner under the tail of an aircraft 2. a rear-wheel skid of a motor vehicle
- Tail-skid
noun, Aeronautics. 1. a runner under the tail of an airplane.
- Tail-slide
noun See tail slide