Use of the if and unless Keywords
Learn about the functionalities of the if and unless keywords in Elixir.
We'll cover the following...
In Elixir, we write lots of small functions. A combination of guard clauses and pattern matching of parameters replaces most of the control flow seen in other languages.
However, Elixir does have a small set of control-flow constructs. The reason we waited so long to introduce them is that we should try not to use them much. We should drop the occasional cond
or case
into our code. ...