Pattern match values in Elixir

Kyle Gill
InstructorKyle Gill

Share this video with your friends

Send Tweet

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: