--

It's actually a little more than just recursion. In Scheme, TCO applies to *any* function call. Because of this it is possible to write far more interesting control structures (such as state machines) without any artifice (i.e., just functions and function calls), and they computationally behave exactly like you would expect (implemented as state transitions, for example, with no stack growth).

--

--

Anurag Mendhekar
Anurag Mendhekar

Written by Anurag Mendhekar

Tech Entrepreneur, Author, and Software Artist

No responses yet