R10 · 39 programs

R10 · The examples as exercises

39 programs, each with the value it produces and each run on every push. Six are landmarks on a difficulty gradient; the rest are ungraded, and this page says so rather than inventing a grading.

The gradient

OUTLINE.md §1 describes the example set as "forming a natural difficulty gradient" and names its landmarks. Those are projected here. The outline’s last two landmarks were the chain track, which is off this site, so the gradient ends at webserver.

stepexamplelineswhat it introduces
1counter13a whole kernel
2sort30bounded generics
3poker167the big pure-functional program
4stoplight45kernels, and upgrade
5counter-v214kernels, and upgrade
6webserver54HTTP

The steps are the outline’s order, which is by what each one introduces — so the line column is not sorted, and poker at step 3 is the longest program on the page.

Everything else, ungraded

33 further programs, by size. Size is a proxy a reader can check; difficulty is a judgement, and nothing in the tree makes it for these, so this page does not either.

examplelinesvalueimports
cons15[3 2 1 0]—
hof2372hof
peektry24[42 7 9]—
point26.~143.0—
patp28[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]urbit
collections29601—
errol30'3.14 0.1 100.0 1e+23 1.7976931348623157e+308 5e-324 -0.0 0.3333333333333333'—
scry30[1 1 1]—
strings31'hello, world (12 bytes) - top suit hearts, a < b true'—
twoc3116.235.262twoc
tap33616hof
sort-imported41'1/3|1/2|2/3|3/4|'rational
roof44[1 1 1 1]—
molds50'atom 42, byte A, rejected x, cmd op 3, kind 2'—
parser53'1234|abc|x|2'parser
interval60'[5/2, 4]|[1, 3]|[1/2, 3]|1/2|yes|[0, 1]'interval, rational
rational-arms6419rational
http-counter680http
parser-combinators70'aaa|ab|<x>|x|123|Q7 |zz|ok|9|2|a b|~'parser
matmul74[[58 64 0] [139 154 0] 0]—
twoc-arms7729twoc
units77.~24.0—
hof-arms7918hof
interval-arms8023interval, rational
generic-class8414—
rand-arms9011rand
parser-arms10033parser
watcher121[2 2 1 1]nockapp
string-views12645—
time-arms20522time
conway2370http
minesweeper3350hof, http
wordle3640http

Every source is in worked examples, with the 14 shortest shown in full.