Y
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
agumonkey
3650 days ago
Maybe the decorator rewrites the AST. I've seen this before.
link
santialbo
3650 days ago
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
link
coconutlang
3649 days ago
Good catch! I'll fix it right away.
link