3 ms·
This example actually does not have a tail-recursive call, so if you mean that a non-tail recursive call is not stack safe in a strict language, that is correct
by yawaramin 6y ago
This example actually does not have a tail-recursive call, so if you mean that a non-tail recursive call is not stack safe in a strict language, that is correct, yes.
- dwohnitmok 6y agoI think wyager's point is that you can extract individual Fibonacci numbers from fibs rather than realizing the infinite list immediately.
- wyager 6y agoRight - my point is that tail call elimination doesn’t help you with guarded corecursion, which lazy languages handle just fine. Guarded corecursion represents a huge set of programs it’s useful to be able to evaluate.