3 ms·
You can think of this as having two base cases, your normal success case and an error case. You could use metaprogramming to do this semi-automatically, like a
by maxbond 2y ago
You can think of this as having two base cases, your normal success case and an error case. You could use metaprogramming to do this semi-automatically, like a decorator that took a maximum depth and checked it before calling your inner function.