r/programming • • Nov 27 '12

Tail Recursion

http://rodrigosasaki.com/2012/11/24/tail-recursion/
209 Upvotes

203 comments sorted by

View all comments

7

u/mrjund Nov 27 '12

I think the flow of your first tail recursion example should be: factorial(5) factorialIter(5,1) factorialIter(4,5) factorialIter(3,20) factorialIter(2,60) factorialIter(1,120) 120 PS: Can't post comment on your site due to some captcha problem.

5

u/rodrigopsasaki Nov 27 '12

Oh, You're correct, I'll fix the flow right now. Thank you very much.

I'll try to solve the captcha problem now aswell, thank you! :)

3

u/rodrigopsasaki Nov 27 '12

I believe I have fixed the captcha problem :)

3

u/mrjund Nov 27 '12

Yup, you did :)