!!
=/ m (malt `(list [@ @])`~[[6 4] [1 7] [5 5]]) (~(get by m) 9)

a lookup miss gives ~, the empty unit.

a hit gives [~ value].

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.

%: 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)

malt builds a map from a list of key-value pairs.

~(wyt by (malt `(list [@ @])`~[[1 2] [3 4]])) is 2.

^- casts a value to a named type: it checks the value fits and relabels it.

^-(@ 42) is 42.

irregular forms:

a leading backtick cast - the type in backticks, then the value - is ^-

list is the type of a null-terminated sequence.

(list @) is a list of atoms; the empty list is ~.

$: makes a tuple mold, naming each face in a cell.

$:(x=@ y=@) is the mold [x=@ y=@].

:~ makes a null-terminated list.

:~(1 2 3) is ~[1 2 3].

irregular forms:

~[a b c] is :~(a b c)

:* makes a tuple of many elements, nesting to the right.

:*(1 2 3) is [1 2 3].

irregular forms:

[a b c d] is :*(a b c d)

~() pulls an arm from a door, setting the door's sample: ~(arm door value).

~(wyt by (malt `(list [@ @])`~[[1 2] [3 4]])) is 2.

~(get by m) looks up a key in a map, giving a unit — [~ value] when present, ~ when absent.

on a map with 1 set to 2, getting 1 is [~ 2].

by is the door of map operations: ~(get by m), ~(put by m), ~(has by m), ~(gut by m), ~(wyt by m), and so on.

(~(get by (malt `(list [@ @])`~[[1 2]])) 1) is [~ 2].