Hacker News new | ask | show | jobs
by aktiur 3650 days ago
Your function in the tail recursion optimization exemple is actually not tail recursive. Factorial needs an accumulator parameter to get that tail call.
1 comments

Maybe the decorator rewrites the AST. I've seen this before.
It does, when the function is actually tco optimizable. The example is not. On the docs however it's correct http://coconut.readthedocs.io/en/master/DOCS.html#recursive
Good catch! I'll fix it right away.