3 ms·
The compiler/language absolutely gets a say in this, you can do tail call recursion without stack saturation.
by worthless-trash 1y ago
The compiler/language absolutely gets a say in this, you can do tail call recursion without stack saturation.
- Retr0id 1y agoTail call elimination is an optimisation that is only possible for certain code patterns. How would you write a tail-recursive tree walk, without using a separate stack or queue data structure to store state?
- worthless-trash 1y agoChallenge accepted, I'll do it over my next long weekend.