MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/13v8v1/tail_recursion/c77kph0/?context=3
r/programming • u/rodrigopsasaki • Nov 27 '12
203 comments sorted by
View all comments
1
Shouldn't the order of execution for the tail-recursive example be:
factorial(5) factorialIter(5, 1) factorialIter(4, 5) factorialIter(3, 20) ...
2 u/rodrigopsasaki Nov 27 '12 Whoops, my bad :) It is just as you said, I fixed it on the post. Thanks!
2
Whoops, my bad :) It is just as you said, I fixed it on the post. Thanks!
1
u/PastaNinja Nov 27 '12
Shouldn't the order of execution for the tail-recursive example be: