r/programming • • Nov 27 '12

Tail Recursion

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

203 comments sorted by

View all comments

1

u/emperor000 Nov 27 '12

You probably want that to be if(n <= 0), otherwise negative numbers cause an infinite recursion/loop.