
28 Mar
2014
28 Mar
'14
7:14 p.m.
On Fri, Mar 28, 2014 at 7:10 PM, John M. Dlugosz
Each recursive call is either 1 or (n-1) so it should count down 5,4,3,2,1 and stop the recursion.
What am I missing? It doesn't magically stop at 0; Integer (inferred type) is signed. Moreover, even if it were not signed, it would wrap around (or possibly throw an exception on some CPUs, but not on Intel). You need to include a check for 0 to stop the recursion. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net