!!
puzzles
%- lent %+ skim (gulf 1 10) |= n=@ =(0 (mod n 3))

the sieve

glossary

%- calls a gate on one argument (or one cell of arguments).

%-(dec 8) is 7.

irregular forms:

(gate arg) is %-(gate arg)

lent is how many elements a list has.

(lent `(list @)`~[8 9 10]) is 3.

%+ calls a gate that takes two arguments.

%+(add 2 3) is 5.

irregular forms:

(gate a b) is %+(gate a b)

skim keeps the list elements a gate says yes to.

(skim `(list @)`~[1 2 3 4] |=(n=@ (gth n 2))) is ~[3 4].

%: calls a gate with several arguments, gathering them into one sample.

%:(add 2 3) is 5.

irregular forms:

(gate a b c) is %:(gate a b c)

gulf builds an inclusive range of atoms as a list.

(gulf 1 5) is ~[1 2 3 4 5].

|= makes a gate: a function with one named sample, then a body.

the body runs with the sample bound.

call the gate to run it.

(|=(a=@ (add a 1)) 4) is 5.

$= wraps a mold with a face, naming the value it produces.

$=(x @) is the mold x=@.

.= tests two nouns for equality, giving a loobean.

.=(3 3) is %.y, and .=(3 4) is %.n.

irregular forms:

=(a b) is .=(a b)

mod is the remainder of a division.

(mod 17 5) is 2.