Nowadays, when I write a recursive function, I will use the last argument `n` to represent the number of function calls. I will then use this as a fake extra base case to bail when `n > MAX_CALLS`. That makes infinite loops impossible while I'm working on the function.
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.