Course lesson

Pattern match values in Elixir

Elixir uses = as an operator, but rather than assigning values to variables with it, it matches values on the right hand side of the = with the left side. This can be used in simple values, more complex data structures, and powerful condition checking.

Duration
2 min
Access
Free
Transcript
Available

Elixir uses = as an operator, but rather than assigning values to variables with it, it matches values on the right hand side of the = with the left side. This can be used in simple values, more complex data structures, and powerful condition checking.

Put into simpler terms, pattern matching is Elixir's way of assigning variables.

Additional resources: