6# 1c: molds and mold builders
12Atom representing a blocksize, by convention expressed as a power of 2.
17 ++ bloq @ :: blockclass
22 > :: ++met measures how many bloqs long an atom is
25 > :: 256 is 2 bloqs of 2^3
32Mold of fork between two
34mold generator: produces a dicriminated fork between two types.
40 |* {a/$-(* *) b/$-(* *)} :: either a or b
41 $%({$& p/a} {$| p/b}) :: a default
48 ?({$.y p/@t} {$.n p/@da})
56A core with one arm, `$`--the empty name--which transforms a sample noun into a product
57noun. If used dryly as a type, the subject must have a sample type of `*`.
63 ++ gate $-(* *) :: general gate
69See also: `++lift`, `++cork`
72 <1.ybc {* <110.jyx 1.ztu $151>}>
73 <1.ybc {* <110.jyx 1.ztu $151>}>
75 > (`gate`|=(a/* [a 'b']) 1)
85mold generator. `++list` generates a mold of a null-termanated list of a
92 ++ list |* a/$-(* *) :: null-term list
93 $@($~ {i/a t/(list a)}) ::
99See also: `++turn`, `++snag`
113`++lone` puts face of `p` on something.
120 ++ lone |*(a/$-(* *) p/a) :: just one thing
127mold generator. Produces a tuple of two of the types passed in.
133 ++ pair |*({a/$-(* *) b/$-(* *)} {p/a q/b}) :: just a pair
150A `++list` without the faces `i` and `t`.
155 ++ pole |* a/$-(* *) :: nameless list
156 $@($~ {a (pole a)}) ::
163 > `(pole char)`"asdf"
164 [~~a [~~s [~~d [~~f ~]]]]
173A `++qual` is a tuple of four of the types passed in.
178 ++ qual |* {a/$-(* *) b/$-(* *) c/$-(* *) d/$-(* *)} :: just a quadruple
184 > *(qual date time tape cord)
185 [p=[[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]] q=~292277024401-.1.1 r="" s='']
194A trap is a core with one arm `++$`.
199 ++ trap |*(a/_* _|?(*a)) :: makes perfect sense
206 <1.mws 101.jzo 1.ypj %164>
219A `++tree` can be empty, or contain a node of a type and
220left/right sub `++tree` of the same type. Pretty-printed with `{}`.
225 ++ tree |* a/$-(* *) :: binary tree
226 $@($~ {n/a l/(tree a) r/(tree a)}) ::
232 > `(tree {@ tape})`[[1 "hi"] [[2 "bye"] ~ ~] ~]
242`++mold` of the tuple of the three types passed in.
247 ++ trel |* {a/$-(* *) b/$-(* *) c/$-(* *)} :: just a triple
264mold generator. A `++unit` is either `~` or `[~ u=a]` where `a` is the
265type that was passed in.
271 ++ unit |* a/$-(* *) :: maybe
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list