Worked solutions for Module 1. Each is the full, running characterization β€” the function next to a table of what it really does, every row pinned to a value the code must produce, live and green (every check passing). That table is the spec, written so it runs.

Read a solution only after you have tried the exercise. The whole point is to be surprised first: a value you looked up teaches you nothing; a value that defied your prediction you never forget.


← Module 1 β€” Introduction Β· The exercises

Reconnecting…
The connection to the server was interrupted. Trying to restore it…
Trying again…
The connection could not be restored. Reloading the page…
The server was updated. Reloading the page to pick up the latest version.