An unless expression selects a branch based on a false condition. It is equivalent to an if expression with the condition negated: the main branch runs unless the condition is truthy, while the else branch runs otherwise. section 3.3.2 section 2.6
Guarding a notification
Use unless when the exceptional condition reads more clearly as the condition to avoid: unless result == :error, do: send_notification(...). The equivalent conventional form is if result != :error, do: send_notification(...). section 3.3.2
unless some_expression do block_1 else block_2 end
The block form supports separate main and else branches; conceptually, it transforms into an if expression with the branches reversed. section 2.6

