MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerAnimemes/comments/fnuof3/comments_you_cant_remove/fldwit2/
r/ProgrammerAnimemes • u/bucket3432 • Mar 23 '20
53 comments sorted by
View all comments
Show parent comment
2
Shouldn't that thing break no matter if you uncomment the code, as there is no limit to when it stops calling itself.
3 u/bucket3432 Mar 24 '20 If you uncomment the code, then yes, it won't terminate. But as written it does because it doesn't call anything when n reaches 0. 1 u/StarDDDude Mar 24 '20 Oh yes thanks for clarifying, I overlooked how the else section wouldn't be executed if it reaches 0.
3
If you uncomment the code, then yes, it won't terminate. But as written it does because it doesn't call anything when n reaches 0.
n
0
1 u/StarDDDude Mar 24 '20 Oh yes thanks for clarifying, I overlooked how the else section wouldn't be executed if it reaches 0.
1
Oh yes thanks for clarifying, I overlooked how the else section wouldn't be executed if it reaches 0.
View all comments
Show parent comment
2
u/StarDDDude Mar 24 '20
Shouldn't that thing break no matter if you uncomment the code, as there is no limit to when it stops calling itself.