=/ even
|= n=@
=(0 (mod n 2))
(even 6)
a gate can produce a yes/no just as readily as a number.
glossary
=/ pins a named value (a face) into the subject for the lines below it.
name=value optionally declares the type.
=/(a 3 (add a a)) is 6.
|= 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)
%: 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)
mod is the remainder of a division.
(mod 17 5) is 2.