by nonrandomstring · 3y ago · 0 comments
unless predicate
do this
else unless impossible_thing
do the impossible
What it did at runtime I have no idea, but it broke my brain for the
rest of the week. if !cond1
do this
elsif !cond2
do that
?it's literally just `!` equivalent. Honestly I haven't seen much code using unless in wild. Especially that it is literally shorter to just !
unless (predicate) {
do_this;
} else {
do_the_impossible unless impossible_thing;
}