3 ms·
If you write your loops with the Y-combinator, you need tail-call elimination to keep them from overflowing the stack when they run for enough iterations, becau
by kragen 14y ago
If you write your loops with the Y-combinator, you need tail-call elimination to keep them from overflowing the stack when they run for enough iterations, because the way your function f goes on to the next iteration of itself is by calling the (Y f) that was passed as its first argument.
- qznc 14y agoYou can write a lambda calculus interpreter which does beta-reduction. In this case, there is no stack which could overflow. Just a lambda expression, which is reduced to another expression.
- kragen 14y agoYes, as I mentioned in another comment in this thread, TCE falls out automatically from combinator-graph reduction.