3 ms·
You need to use it when you want to be negative of ALL the thing after unless. Basically, do_something unless A Then it's simple now to manipulate the inside
by revskill 4y ago
You need to use it when you want to be negative of ALL the thing after unless.
Basically, do_something unless A
Then it's simple now to manipulate the inside of A, as you only take care of the positive ! That's beautiful and simple design.
Example is you want to validate something.
raise Error unless someValidCondition.
Now decompose someValidCondition by just using positive connectives, simple right ?