3 ms·
Probably. This is my experience with the case of the unbalanced if. When it happens to me in Python or Ruby, I return immediately from the smaller branch and m
by pmontra 7y ago
Probably. This is my experience with the case of the unbalanced if.
When it happens to me in Python or Ruby, I return immediately from the smaller branch and move the other branch out of the if, to the main level.
When it happens in Elixir... It doesn't happen because I don't use ifs there. I write two versions of the same function. One matches the condition for the then branch, the other the condition for the else one.