Elixir first programs with pattern matching and pipes

8 steps · about 2 h 50 min · Beginner

  1. Install Elixir and use iex (tutorial, Elixir docs, 10 min)

    Gets the interactive shell running so every later example can be tried immediately.

  2. Learn the basic types (tutorial, Elixir docs, 20 min)

    Atoms, strings, lists and tuples are the values every pattern will match against.

  3. 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.

  4. Branch with case, cond and if (tutorial, Elixir docs, 15 min)

    Shows when to pattern match in case versus test conditions with cond.

  5. Group code into modules with multi-clause functions (tutorial, Elixir docs, 20 min)

    Function heads with patterns and guards replace most if/else chains.

  6. Loop with recursion (tutorial, Elixir docs, 15 min)

    Elixir has no loops; this shows reduce and map written as recursive clauses.

  7. Chain transformations with |> (tutorial, Elixir School, 10 min)

    Rewrites nested calls as a readable top-to-bottom pipeline.

  8. Practise with mentored exercises (interactive, Exercism, 1 h)

    Short graded exercises with optional human mentoring to lock in the syntax.