| Sentiment-routing agent: classify a message, route by polarity | 67 | a state machine, an agent cell, LLM calls (think), match, tools |
| Reflective tool-dispatch agent: routes a named action to the right tool | 77 | a state machine, an agent cell, LLM calls (think), match, try / catch, tools |
| Agent lifecycle typed against a sum type — typos become compile errors | 57 | a state machine, an agent cell, a sum type, match |
| A stack (LIFO) backed by a List, used to check balanced brackets | 69 | match |
| Relational inner_join: enrich order rows with customer details, then roll up spend per customer tier | 57 | pipes (|>), match |
| Meter billing — you are billed exactly what the meter read, once | 115 | a state machine, a memory invariant, match, try / catch |
| Brokerage fee calculator: tiered commission, bps fee with a floor, and a maker/taker exchange fee | 57 | match |
| Trade settlement as a sum type | 58 | a sum type, match |
| Blackjack — hand scoring with soft/hard aces and bust detection hand_value() sums card ranks, counting each Ace as 11 then demoting to 1 while the total busts | 86 | match |
| Craps — the come-out roll and point-resolution rules come_out(total) resolves the first roll: 7/11 wins, 2/3/12 craps out, any other number becomes the "point" | 77 | match |
| Number guessing game — hi/lo feedback and a binary-search solver feedback() compares a guess to the secret and returns "low" / "high" / "correct" | 67 | match |
| Mastermind — score a guess with black and white pegs | 92 | match |
| Rock-paper-scissors — round judging and best-of-N scoring judge(a, b) returns "p1", "p2", or "tie" from the two throws | 72 | match |
| Tournament bracket — eliminated means eliminated | 73 | a state machine, match, try / catch |
| Wager duel — staked gold that exactly one fighter can win | 122 | a state machine, a memory invariant, match, try / catch |
| Container seal — a broken seal cannot be quietly replaced | 108 | a state machine, a memory invariant, match, try / catch |
| Blood bank — an ABO-incompatible transfusion is unrepresentable, and | 129 | a memory invariant, match, try / catch, lambdas |
| Medication administration — the "five rights" enforced by barcode, no scan no dose Wrong-patient and wrong-drug medication errors are among the most common causes of inpatient harm | 135 | a state machine, match, try / catch |
| Surgical safety checklist — no incision before time-out, and the count | 146 | a state machine, a memory invariant, match, try / catch |
| Nested config record with defaults, merge-style overrides, and a deep-path reader | 58 | match |
| Gradebook: Student records each holding a list of Score records | 58 | pipes (|>), match, lambdas |
| Payments approval — a whole service in one file: a ledger that cannot overdraw, a payment lifecycle the verifier proves, an HTTP API that maps error kinds to status codes, and tests that run offline | 165 | a state machine, a memory invariant, HTTP routes, match, try / catch, require / fail, several cells, a whole verified service |
| Refund agent — an LLM decides, the language decides what it may do | 162 | a state machine, a memory invariant, an agent cell, a sum type, LLM calls (think), match, try / catch, guard blocks, require / fail, a cost bound, tools |
| Warehouse reservations — two cells: a stock ledger with hard bounds and a reservation lifecycle with a supervisor guard, behind one HTTP router | 187 | a state machine, a memory invariant, HTTP routes, match, try / catch, guard blocks, require / fail, several cells, a whole verified service |
| Turnstile — a signal that may take any edge, and says so | 84 | a state machine, a memory invariant, match, require / fail, a skeleton |
| Online game-match lifecycle | 81 | a state machine, a memory invariant, match |
| A two-road traffic-light interlock proven safe by construction | 62 | a state machine, match |
| Mini blog API with tag filtering. Posts carry a list of tags; | 61 | HTTP routes, pipes (|>), match, lambdas |
| Form handler with server-side validation | 54 | HTTP routes, match |
| Counter API: a persistent integer counter exposed over HTTP | 68 | HTTP routes, match |
| Feature-flag service: toggle named flags on/off, query state, list all | 61 | HTTP routes, match |
| Guestbook: append-only signed entries, rendered as a small HTML page | 66 | HTTP routes, match |
| Key-value store API with namespaced keys and a bulk export endpoint | 65 | HTTP routes, match |
| Leaderboard API: submit a score, get the ranked top-N | 86 | HTTP routes, pipes (|>), match |
| Metrics / health endpoint. Every request bumps a request counter; | 63 | HTTP routes, match |
| CRUD JSON API over a persistent Map: notes with title + body | 77 | HTTP routes, match |
| Paginated product list: GET /products?page=N&size=M slices a stored list | 57 | HTTP routes, match |
| Voting / poll API: fixed options, one counter per option, results sorted | 63 | HTTP routes, pipes (|>), match, lambdas |
| Session/login toy: POST /login issues a token, GET /me/<token> returns the user, POST /logout invalidates it | 58 | HTTP routes, match |
| Multi-page static site: home, about, and a dynamic greeting route | 42 | HTTP routes, match |
| Todo service backed by a typed state machine (sum type TodoStatus) | 82 | a state machine, a sum type, HTTP routes, match |
| URL shortener: POST a long URL, get a short code; GET the code redirects | 75 | HTTP routes, match |
| Webhook receiver + event log. POST /hook/<source> appends an event; | 71 | HTTP routes, pipes (|>), match, lambdas |