Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
aktiur
· 10y ago · 0 comments
Your function in the tail recursion optimization exemple is actually not tail recursive. Factorial needs an accumulator parameter to get that tail call.
Comments
[–]
agumonkey
10y ago
Maybe the decorator rewrites the AST. I've seen this before.
[–]
santialbo
10y 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
[–]
coconutlang
10y ago
Good catch! I'll fix it right away.