!!
puzzles-2
~(wyt by (malt `(list [@ @])`~[[1 2] [3 4]]))

the pull

glossary

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

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

~(wyt by m) counts the keys in a map.

a map with two keys 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].

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