![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Recursion and Higher-order Functions - slide 3 : 49 |
Recursive functions are sufficient - but typically memory inefficient - for programming of an iterative process.
Tail recursive functions in Scheme are memory efficient for programming of any iterative process.
Tail recursion is a variant of recursion in which the recursive call takes place without contextual, surrounding calculations in the recursive function.
In a tail recursion function the recursive call is a tail call (see next slide)
![]() | A tail recursive formulation of the function fak and the accompanying iterative process without memory optimization |
![]() | A tail recursive formulation of the function fak and the accompanying, memory optimized iterative process |