Exercises
A path from imperative programming to functional thinking. Start with JavaScript-based exercises, build through abstract foundations, then move into Elixir and deeper theory. Work top-to-bottom on your first pass. You'll write your first real Elixir at Algebraic Laws — the JavaScript steps come first because it's easier to learn functional thinking in familiar C-style syntax than to take on a new language and a new paradigm at once. If JavaScript is also new to you, the exercises are small enough to pick it up as you go.
New here? Each card below is a different kind of practice. See how practice works.
- Refactoring and Tracing — rewrite and predict code, from imperative JavaScript to functional thinking. Start here.
- Substitutions, Functions, and Logic — short drills on the abstract foundations: binding, application, boolean reasoning.
- Quick drills — multiple-choice, true/false, matching, and sorting checks on the concepts above.
- Parson Puzzles and language introductions — rebuild solutions from blocks, or learn Lua, Elixir, and Erlang in short graded lessons.
- Flowcharts, Reasoning Replays, and Algorithms — watch a solution get worked, then solve real problems yourself.
- Proofs, Induction, and Lambda Calculus — the deeper theory, at the end of the path.
Refactoring
Rewrite imperative JS/TS loops and mutations as map, filter, and reduce. Start here.
Tracing
Predict how a JavaScript expression evaluates step by step. Builds the substitution model.
Substitutions
Bind variables and track how expressions reduce by replacing equals with equals.
Functions
Apply and compose functions; understand input-output mappings as data.
Logic
Evaluate propositional logic expressions — the same boolean reasoning behind &&, || and ! in code.
Port JS to Elixir
Translate the functional JavaScript from your Refactoring answers into Elixir, function by function.
Lua for algorithm practice
Learn enough Lua to solve the algorithm exercises — variables, tables, loops, functions — in short graded lessons. Your first language introduction.
Elixir for algorithm practice
Learn enough Elixir to solve the algorithm exercises in a functional language — immutability, pattern matching, recursion — in short graded lessons.
Menu-pick
Multiple-choice concept checks.
Erlang for algorithm practice
Learn enough Erlang to solve the algorithm exercises in the BEAM's native language — modules, pattern matching, recursion — in short graded lessons.
Swipe
Quick true/false recognition drills.
Match pairs
Match terms to their definitions or equivalents.
Bucket Sort
Sort items into the right categories.
Parson Puzzles
Rebuild solutions from blocks — a low-load bridge between reading and writing
Algebraic Laws
Write small Elixir functions and verify they satisfy monoid laws — your first real Elixir.
Reasoning Replays
Replay a worked solution one decision at a time, predicting each next move.
Algorithms
Classic problems in Elixir (and other languages). Apply what you know.
Proofs
Structured proofs and quantifiers over functions and logic.
Induction
See the recursive call as the inductive hypothesis — the keystone of FP.
Lambda Calculus
Functions as the only primitive; capture-avoiding substitution. The mathematical end.
Flowcharts
Read an algorithm as an executable flowchart: watch it run on a real input, then trace it by hand.
Articles
Long-form write-ups connecting the exercises above — no account required to read.
take-local
Capstone: build a real Elixir CLI project locally and submit it with the letitcrash CLI.
Luerl Labs
Write Lua inside a capability-limited sandbox — which APIs exist, what a forbidden call looks like, and why the host survives.