July 2018
Intermediate to advanced
574 pages
14h 7m
English
These two constructs can be used with the following syntax:
if <expression> do # expression was truthyelse # expression was falsyendunless <expression> do # expression was falsyelse # expression was truthyend
As with the def construct, they can be inlined. For if, you'd do this:
if <expression>, do: # expression was truthy, else: # expression was falsy
For both constructs, the else clause is optional. They will return nil if the main clause doesn't match and no else clause was provided.
Read now
Unlock full access