Elixir first programs with pattern matching and pipes
8 steps · about 2 h 50 min · Beginner
- Install Elixir and use iex (tutorial, Elixir docs, 10 min)
Gets the interactive shell running so every later example can be tried immediately.
- Learn the basic types (tutorial, Elixir docs, 20 min)
Atoms, strings, lists and tuples are the values every pattern will match against.
- Use = as a match, not assignment (tutorial, Elixir docs, 20 min)
The single idea that makes the rest of Elixir read naturally, including the pin operator.
- Branch with case, cond and if (tutorial, Elixir docs, 15 min)
Shows when to pattern match in case versus test conditions with cond.
- Group code into modules with multi-clause functions (tutorial, Elixir docs, 20 min)
Function heads with patterns and guards replace most if/else chains.
- Loop with recursion (tutorial, Elixir docs, 15 min)
Elixir has no loops; this shows reduce and map written as recursive clauses.
- Chain transformations with |> (tutorial, Elixir School, 10 min)
Rewrites nested calls as a readable top-to-bottom pipeline.
- Practise with mentored exercises (interactive, Exercism, 1 h)
Short graded exercises with optional human mentoring to lock in the syntax.