3 ms·
Tail calls do not just deal with recursive functions, in general TCO works on any function call in tail position. Maybe a more general recur construct (maybe ca
by steinuil 8y ago
Tail calls do not just deal with recursive functions, in general TCO works on any function call in tail position. Maybe a more general recur construct (maybe called "jump") would be a good idea, but then you'd have to remember to use it.
- shakna 8y agoClojure is limited by the JVM, hence the need for recur. However, between it and trampoline you get most of the way to what TCO offers, albeit with the need for the programmer to be explicit.