Assignments with the Match Operator
Learn how to use the match operator for assignments in Elixir.
We'll cover the following...
In most languages, =
is the assignment operator. To assign the value 1
to a variable a
, depending on the language, we write something like a = 1
. The value on the right-hand side is assigned to the variable on the left-hand side.
Examples
But in Elixir, =
isn’t ...