3 ms·
Most of the time, you'll return early after an error. To get into a situation where you'd need to handle n! cases, you'd need to keep running the statements af
by boloust 5y ago
Most of the time, you'll return early after an error.
To get into a situation where you'd need to handle n! cases, you'd need to keep running the statements after a failure, and then collate and return all the errors at the end.
Not sure why you'd want to do that. You'd definitely need to go out of your way to do something like this, and probably start asking yourself why you're doing this pretty early on. Plus it would flat out refuse to compile in some cases where there are dependencies between the statements.
- closeparen 5y agoIt’s + not * in that example.
- boloust 5y agoAh, okay. In that case it becomes {n + 1 \choose n - 1} What code are you writing that results in this set of possibilities?