Closed 0riginaln0 closed 2 months ago
Executing a factorial from zero is expected to return one, not "RangeError: Maximum call stack size exceeded". Additionally, 0 | 1 is quite clear and easy to understand.
Well, since alternative patterns lesson will be after the added ones, it makes sense to change 0 | to a separate case 0 -> 1
0 |
0 -> 1
Executing a factorial from zero is expected to return one, not "RangeError: Maximum call stack size exceeded". Additionally, 0 | 1 is quite clear and easy to understand.