Intro
Elixir intro notes covering key definitions, core concepts, worked examples, and practice problems.
sources:
Elixir is a programming language with a rich type system and ecosystem. These notes cover the language from fundamentals to advanced topics, with worked examples, practice problems, and flashcards.
Elixir is like a team of skilled workers, each with their own workspace and tools. They communicate by passing notes rather than sharing a whiteboard. This isolation means one worker’s mistake does not corrupt another’s work, and the supervisor can replace a worker without disrupting the team.
These notes guide you from the basics of the workshop (data types and pattern matching) to the advanced machinery (metaprogramming and OTP). Each section builds on the previous, like learning to use hand tools before power tools. Master the fundamentals, and the advanced topics become natural extensions of what you already know.
Elixir developers often nest function calls deeply, making code hard to read. The pipe operator |> passes the result of the left-hand expression as the first argument to the right-hand function. Instead of Enum.sum(Enum.filter(Enum.map(list, &(&1 * 2)), &(&1 > 10))), write list |> Enum.map(&(&1 * 2)) |> Enum.filter(&(&1 > 10)) |> Enum.sum(). The pipe operator is idiomatic Elixir and makes data transformation pipelines clear.
Students often use conditional statements (if/case) inside a single function body instead of defining multiple function clauses with pattern matching. For example, instead of writing def handle(:ok, data), do: ... and def handle(:error, reason), do: ... as separate clauses, they write one function with a case statement. Multiple clauses are more readable and follow Elixir conventions.
Elixir processes are isolated by default — they do not share memory. Students coming from shared-memory languages sometimes assume they can mutate shared state. Instead, use message passing (send/2 and receive) or agents/ETS for shared state. Each process has its own heap and stack, so a crash in one process does not affect others unless you explicitly link them.
Intro
Elixir intro notes covering key definitions, core concepts, worked examples, and practice problems.
Basics
Elixir basics notes covering key definitions, core concepts, worked examples, and practice problems.
Functions modules
Elixir functions modules notes covering key definitions, core concepts, worked examples, and practice problems.
Concurrency
Elixir concurrency notes covering key definitions, core concepts, worked examples, and practice problems.
Advanced
Elixir advanced notes covering key definitions, core concepts, worked examples, and practice problems.
Flashcards elixir basics
Elixir flashcards elixir basics notes covering key definitions, core concepts, worked examples, and practice problems.
Practice elixir basics
Elixir practice elixir basics notes covering key definitions, core concepts, worked examples, and practice problems.