3 ms·
Both function calls are in tail position. This is what actually matters (along with the ABI return type matching for runtimes where that matters).
by slaymaker1907 6y ago
Both function calls are in tail position. This is what actually matters (along with the ABI return type matching for runtimes where that matters).
- dwohnitmok 6y ago'loop' is not in a tail position. The last operation is the list cons. It can be optimized with TCO modulo cons but that would just make it hang/exhaust heap rather than stack overflow in a strict language.