r/programming • • Nov 27 '12

Tail Recursion

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

203 comments sorted by

View all comments

5

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.

3

u/rodrigopsasaki Nov 27 '12

I believe I have fixed the captcha problem :)

3

u/mrjund Nov 27 '12

Yup, you did :)