Appendices

Syntax cheat sheet, reserved words, operator reference, Elixir version highlights, learning resources and suggested study plan (12 weeks).

Appendices

51.1 Syntax cheat sheet 51.2 Reserved words true false nil when and or not in fn do end catch rescue after else

Plus special forms/macros: case cond if unless with for receive try quote unquote unquote_splicing def defp defmacro defmacrop defmodule defstruct defprotocol defimpl defexception defguard defdelegate defoverridable import alias require use super __MODULE__ __ENV__ __CALLER__ __DIR__ __STACKTRACE__ 51.3 Operator reference arithmetic (/ returns float) list concat/subtract in, not in range, stepped range typespec / bitstring type cons, map update, union in specs text/regex match generator / with clause 51.4 Elixir version highlights first stable release multi-alias, with Registry, Task.async_stream @impl, child specs code formatter, defguard, DynamicSupervisor __STACKTRACE__, Logger metadata releases built into Mix, config/runtime via releases is_struct/1, compile-env

config/runtime.exs, is_map_key in guards Mix.install, then/2, tap/2, stepped ranges semantic recompilation, mix xref improvements dbg/1, PartitionSupervisor compiler speedups, Duration groundwork, multi-letter sigils code snippets in diagnostics, anti-patterns docs set-theoretic types (patterns/guards), Duration, Date.shift type checking of calls, built-in JSON, ExUnit parameterize broader type inference, faster compilation 51.5 Learning resources

Official: elixir-lang.org Getting Started guide, hexdocs.pm/elixir, Elixir School (elixirschool.com)

*Elixir in Action* — Saša Jurić (3rd ed.) *Programming Elixir* — Dave Thomas

*Designing Elixir Systems with OTP* — James Gray & Bruce Tate *Metaprogramming Elixir* — Chris McCord

*Programming Phoenix LiveView* — Bruce Tate & Sophie DeBenedetto

*Programming Ecto* — Darin Wilson & Eric Meadows-Jönsson *Concurrent Data Processing in Elixir* — Svilen Gospodinov

*Adopting Elixir*, *Testing Elixir*, *Machine Learning in Elixir*

Practice: Exercism Elixir track, Advent of Code, Elixir Koans

Community: elixirforum.com, Elixir Slack/Discord, ElixirConf talks (YouTube), *Thinking Elixir* & *Elixir Wizards* podcasts, Elixir Radar newsletter 51.6 Suggested study plan (12 weeks)

Install, IEx, types, operators, pattern matching Functions, modules, control flow, recursion — Part I exercises

Collections, structs, Enum, Stream, comprehensions Strings/binaries, sigils, pipes, modules & attributes

Protocols, behaviours, errors, typespecs, IO, dates Mix, ExUnit, docs — Part II exercises, Projects 1–2 Processes, links, monitors, Agent, Task

GenServer, supervisors, Registry, applications — Project 3 ETS, distribution, metaprogramming, DSLs — Project 8

Interop, pipelines, observability, performance, releases Phoenix, LiveView, Ecto — Project 6

Ecosystem libraries, best practices — Project 7 or 9 🎓 Final Words

You now have a complete map of Elixir: from pattern matching and pipelines to GenServers, supervision trees, distributed clusters, macros, Phoenix LiveView, and Nx. Build small projects, read the source of great libraries (Elixir itself, Phoenix, Ecto, Oban), and lean on the friendly community at elixirforum.com. Happy coding! 💧

# Basics
x = 1; ^x = 1
"Hello #{name}"; "a" <> "b"; [1 | [2]]; [1] ++ [2]; %{a: 1}; {:ok, v}

# Functions
add = fn a, b -> a + b end; add.(1, 2)
&(&1 + 1); &String.upcase/1
defmodule M do
  def f(x) when is_integer(x), do: x
  defp g(x \\ 0), do: x
end

# Control
case v do
  {:ok, x} -> x
  _ -> nil
end
cond do
  a -> 1
  true -> 2
end
if c, do: 1, else: 2
with {:ok, a} <- f(), {:ok, b} <- g(a), do: b

# Collections
Enum.map(list, &(&1 * 2)); for x <- list, x > 1, into: %{}, do: {x, x}
%{map | key: v}; %User{user | name: "x"}; put_in(m, [:a, :b], 1)

# Processes
pid = spawn(fn -> receive do msg -> msg end end); send(pid, :hi)
GenServer.call(pid, :req); GenServer.cast(pid, :msg)
Task.async(fn -> 1 end) |> Task.await()

# Errors
try do ... rescue e in RuntimeError -> e after ... end
raise ArgumentError, "msg"

# Macros
defmacro m(x), do: quote(do: unquote(x) * 2)