on master help sign in
Molds - may not need these.
commita5d3ba9c6969dc32de699c86d3e6460449e0faaa authorC. Guy Yarvin <cgyarvin@gmail.com> dateFri 11 Mar 2016, 14:53 (11 years ago) parent97f59fe
97 files changed+2124
docs/system/hoon/library/mold/abel.md+16 docs/system/hoon/library/mold/axis.md+25 docs/system/hoon/library/mold/base.md+27 docs/system/hoon/library/mold/bean.md+23 docs/system/hoon/library/mold/beer.md+19 docs/system/hoon/library/mold/beet.md+18 docs/system/hoon/library/mold/bloq.md+20 docs/system/hoon/library/mold/calf.md+26 docs/system/hoon/library/mold/char.md+22 docs/system/hoon/library/mold/chub.md+16 docs/system/hoon/library/mold/chum.md+29 docs/system/hoon/library/mold/clue.md+14 docs/system/hoon/library/mold/coil.md+16 docs/system/hoon/library/mold/coin.md+36 docs/system/hoon/library/mold/cord.md+28 docs/system/hoon/library/mold/date.md+20 docs/system/hoon/library/mold/dime.md+21 docs/system/hoon/library/mold/each.md+19 docs/system/hoon/library/mold/edge.md+22 docs/system/hoon/library/mold/foot.md+31 docs/system/hoon/library/mold/gate.md+29 docs/system/hoon/library/mold/hair.md+25 docs/system/hoon/library/mold/jar.md+30 docs/system/hoon/library/mold/jug.md+28 docs/system/hoon/library/mold/like.md+27 docs/system/hoon/library/mold/limb.md+18 docs/system/hoon/library/mold/line.md+28 docs/system/hoon/library/mold/list.md+26 docs/system/hoon/library/mold/lone.md+12 docs/system/hoon/library/mold/mane.md+26 docs/system/hoon/library/mold/manx.md+17 docs/system/hoon/library/mold/map.md+25 docs/system/hoon/library/mold/marl.md+16 docs/system/hoon/library/mold/mars.md+15 docs/system/hoon/library/mold/mart.md+18 docs/system/hoon/library/mold/marx.md+16 docs/system/hoon/library/mold/metl.md+9 docs/system/hoon/library/mold/nail.md+19 docs/system/hoon/library/mold/nock.md+29 docs/system/hoon/library/mold/noun.md+10 docs/system/hoon/library/mold/null.md+11 docs/system/hoon/library/mold/numb.md+6 docs/system/hoon/library/mold/odor.md+22 docs/system/hoon/library/mold/pair.md+20 docs/system/hoon/library/mold/pass.md+12 docs/system/hoon/library/mold/path.md+19 docs/system/hoon/library/mold/pint.md+22 docs/system/hoon/library/mold/pole.md+18 docs/system/hoon/library/mold/port.md+23 docs/system/hoon/library/mold/post.md+22 docs/system/hoon/library/mold/prop.md+10 docs/system/hoon/library/mold/qeu.md+24 docs/system/hoon/library/mold/qual.md+18 docs/system/hoon/library/mold/rege.md+34 docs/system/hoon/library/mold/ring.md+12 docs/system/hoon/library/mold/rule.md+27 docs/system/hoon/library/mold/set.md+26 docs/system/hoon/library/mold/span.md+30 docs/system/hoon/library/mold/spot.md+21 docs/system/hoon/library/mold/tang.md+7 docs/system/hoon/library/mold/tank.md+39 docs/system/hoon/library/mold/tape.md+21 docs/system/hoon/library/mold/tarp.md+27 docs/system/hoon/library/mold/term.md+28 docs/system/hoon/library/mold/tiki.md+34 docs/system/hoon/library/mold/time.md+23 docs/system/hoon/library/mold/tine.md+30 docs/system/hoon/library/mold/toga.md+40 docs/system/hoon/library/mold/tone.md+45 docs/system/hoon/library/mold/toon.md+26 docs/system/hoon/library/mold/tram.md+24 docs/system/hoon/library/mold/trap.md+24 docs/system/hoon/library/mold/tree.md+19 docs/system/hoon/library/mold/trel.md+18 docs/system/hoon/library/mold/tuna.md+25 docs/system/hoon/library/mold/tune.md+13 docs/system/hoon/library/mold/tusk.md+21 docs/system/hoon/library/mold/twig.md+9 docs/system/hoon/library/mold/twin.md+25 docs/system/hoon/library/mold/tyke.md+23 docs/system/hoon/library/mold/type.md+6 docs/system/hoon/library/mold/typo.md+18 docs/system/hoon/library/mold/tyre.md+12 docs/system/hoon/library/mold/udal.md+10 docs/system/hoon/library/mold/udon.md+15 docs/system/hoon/library/mold/umph.md+13 docs/system/hoon/library/mold/unce.md+8 docs/system/hoon/library/mold/unit.md+25 docs/system/hoon/library/mold/upas.md+12 docs/system/hoon/library/mold/urge.md+7 docs/system/hoon/library/mold/vase.md+19 docs/system/hoon/library/mold/vise.md+17 docs/system/hoon/library/mold/wain.md+32 docs/system/hoon/library/mold/wall.md+31 docs/system/hoon/library/mold/wine.md+86 docs/system/hoon/library/mold/wing.md+15 docs/system/hoon/library/mold/wonk.md+29
docs/system/hoon/library/mold/abel.mdnew file+16
@@ -0,0 +1,16 @@
1+### `++abel`
2+
3+Biblical names in hoon are primarily aliases for the compiler.
4+
5+Source
6+------
7+
8+ ++ abel typo :: original sin: type
9+
10+Examples
11+--------
12+
13+ ~zod/try=> *abel
14+ %void
15+
16+
docs/system/hoon/library/mold/axis.mdnew file+25
@@ -0,0 +1,25 @@
1+
2+### `++axis`
3+
4+Nock axis
5+
6+A Nock axis inside a [noun](). After the leading 1, in binary, a `1` signfies
7+right and `0` left.
8+
9+Source
10+------
11+
12+ ++ axis ,@ :: tree address
13+
14+Examples
15+--------
16+
17+ ~zod/try=> *axis
18+ 0
19+
20+ ~zod/try=> :: 0 is not actually a valid axis
21+ ~zod/try=> [[4 5] 6 7]
22+ [[4 5] 6 7]
23+ ~zod/try=> `axis`0b110
24+ 6
25+
docs/system/hoon/library/mold/base.mdnew file+27
@@ -0,0 +1,27 @@
1+
2+### `++base`
3+
4+Base type
5+
6+A base type that [noun]()s are built from. A `++base` is either a noun, cell, boolean or
7+null labelled with an [odor]().
8+
9+Source
10+------
11+
12+ ++ base ?([%atom p=odor] %noun %cell %bean %null) :: axils, @ * ^ ? ~
13+
14+Examples
15+--------
16+
17+ ~zod/try=> *base
18+ %null
19+
20+ ~zod/try=> (ream '=|(^ !!)')
21+ [%tsbr p=[%axil p=%cell] q=[%zpzp ~]]
22+ ~zod/try=> :: p.p is a ++base
23+ ~zod/try=> (ream '=|(@t !!)')
24+ [%tsbr p=[%axil p=[%atom p=~.t]] q=[%zpzp ~]]
25+ ~zod/try=> (ream '=|(? !!)')
26+ [%tsbr p=[%axil p=%bean] q=[%zpzp ~]]
27+
docs/system/hoon/library/mold/bean.mdnew file+23
@@ -0,0 +1,23 @@
1+### `++bean`
2+
3+Boolean
4+
5+`0`, `&`, or `%.y` are true, and `1`, `|`, and `%.n` are false.
6+
7+Source
8+------
9+
10+ ++ bean ,? :: 0=&=yes, 1=|=no
11+
12+Examples
13+--------
14+
15+ ~zod/try=> *bean
16+ %.y
17+
18+ ~zod/try=> `bean`&
19+ %.y
20+ ~zod/try=> `bean`|
21+ %.n
22+
23+
docs/system/hoon/library/mold/beer.mdnew file+19
@@ -0,0 +1,19 @@
1+### `++beer`
2+
3+Tape builder
4+
5+Used to build [tape]()s internally.
6+
7+Source
8+------
9+
10+ ++ beer $|(@ [~ p=twig]) :: simple embed
11+
12+Examples
13+--------
14+
15+ ~zod/try=> `beer`'as'
16+ 29.537
17+ ~zod/try=> `beer`[~ (ream 'lan')]
18+ [~ p=[%cnzz p=~[%lan]]]
19+
docs/system/hoon/library/mold/beet.mdnew file+18
@@ -0,0 +1,18 @@
1+### `++beet`
2+
3+XML interpolation cases
4+
5+Used internally.
6+
7+Source
8+------
9+
10+ ++ beet $| @ :: advanced embed
11+ $% [%a p=twig] :: take tape
12+ [%b p=twig] :: take manx
13+ [%c p=twig] :: take marl
14+ [%d p=twig] :: take $+(marl marl)
15+ [%e p=twig q=(list tuna)] :: element literal
16+ == ::
17+
18+
docs/system/hoon/library/mold/bloq.mdnew file+20
@@ -0,0 +1,20 @@
1+### `++bloq`
2+
3+Blocksize
4+
5+Atom representing a blocksize, by convention expressed as a power of 2.
6+
7+
8+Source
9+------
10+
11+ ++ bloq ,@ :: blockclass
12+
13+Examples
14+--------
15+
16+ ~zod/try=> :: ++met measures how many bloqs long an atom is
17+ ~zod/try=> (met 3 256)
18+ 2
19+ ~zod/try=> :: 256 is 2 bloqs of 2^3
20+
docs/system/hoon/library/mold/calf.mdnew file+26
@@ -0,0 +1,26 @@
1+### `++calf`
2+
3+Cyclical backreferences
4+
5+Encodes cyclical backreferences in types. Used in pretty printing.
6+
7+Source
8+------
9+
10+ ++ calf ,[p=(map ,@ud wine) q=wine] ::
11+
12+Examples
13+--------
14+
15+ ~zod/try=> `calf`[~ %atom %ta]
16+ [p={} q=[%atom p=%ta]]
17+
18+ ~zod/try=> `calf`~(dole ut p:!>(*^))
19+ [p={} q=[%plot p=~[%noun %noun]]]
20+
21+ ~zod/try=> `calf`~(dole ut p:!>($:|-(?(~ [* $]))))
22+ [ p={[p=1 q=[%pick p=~[[%pear p=%n q=0] [%plot p=~[%noun [%stop p=1]]]]]]}
23+ q=[%stop p=1]
24+ ]
25+
26+
docs/system/hoon/library/mold/char.mdnew file+22
@@ -0,0 +1,22 @@
1+### `++char`
2+
3+Char
4+
5+A single character. [odor]() [`@tD`]() designates a single unicode byte. All
6+parsers consume [`++tape`]()s, which are lists of `++char`.
7+
8+
9+Source
10+------
11+
12+ ++ char ,@tD :: UTF-8 byte
13+
14+Examples
15+--------
16+
17+ ~zod/try=> *char
18+ ''
19+ ~zod/try> (char 97)
20+ 'a'
21+
22+
docs/system/hoon/library/mold/chub.mdnew file+16
@@ -0,0 +1,16 @@
1+### `++chub`
2+
3+Attach jets
4+
5+Used by the compiler (implicitly by `%sgcn`) to attach jets.
6+
7+Source
8+------
9+
10+ ++ chub :: registered battery
11+ $: p=(pair chum tyre) :: definition
12+ q=* :: battery
13+ r=(unit (pair axis chub)) :: parent
14+ == ::
15+
16+
docs/system/hoon/library/mold/chum.mdnew file+29
@@ -0,0 +1,29 @@
1+### `++chum`
2+
3+Jet hint information
4+
5+Jet hint information that must be present in the body of a `~/` or `~%`
6+rune. A `++chum` can optionally contain a kelvin version, jet vendor,
7+and "{major}.{minor}" version number.
8+
9+Source
10+------
11+
12+ ++ chum $? lef=term :: jet name
13+ [std=term kel=@] :: kelvin version
14+ [ven=term pro=term kel=@] :: vendor and product
15+ [ven=term pro=term ver=@ kel=@] :: all of the above
16+ == ::
17+
18+Examples
19+--------
20+
21+XX there's a ++chum in zuse that's politely causing this not to work
22+
23+ ~zod/try=> `chum`'hi'
24+ lef=%hi
25+
26+ ~zod/try=> (ream '~/(%lob.314 !!)')
27+ [%sgfs p=[std=%lob kel=314] q=[%zpzp ~]]
28+
29+
docs/system/hoon/library/mold/clue.mdnew file+14
@@ -0,0 +1,14 @@
1+### `++clue`
2+
3+Attach jet
4+
5+Used by compiler to attach jets.
6+
7+Source
8+------
9+
10+ ++ clue ,[p=axis q=chum r=tyre] :: battery definition
11+
12+XX implementation does not currenlty match docs
13+
14+
docs/system/hoon/library/mold/coil.mdnew file+16
@@ -0,0 +1,16 @@
1+### `++coil`
2+
3+Tuple of core information
4+
5+Variance `p`, subject type `q`, and `q`: optional compiled nock, and arms. Used as an
6+intermediate step within Section 2fB. Converted by `++core` to %core type.
7+
8+Source
9+------
10+
11+ ++ coil $: p=?(%gold %iron %lead %zinc) :: core type
12+ q=type ::
13+ r=[p=?(~ ^) q=(map term foot)] ::
14+ == ::
15+
16+
docs/system/hoon/library/mold/coin.mdnew file+36
@@ -0,0 +1,36 @@
1+### `++coin`
2+
3+Noun literal syntax cases
4+
5+Noun literal syntax cases: atoms, jammed nouns, and nestable tuples.
6+Parsed and printed using [`++so`]() and [`++co`]() cores.
7+
8+Source
9+------
10+
11+ ++ coin $% [%$ p=dime] ::
12+ [%blob p=*] ::
13+ [%many p=(list coin)] ::
14+ == ::
15+
16+Examples
17+--------
18+
19+ ~zod/try=> `coin`(need (slay '~s1'))
20+ [%$ p=[p=~.dr q=18.446.744.073.709.551.616]]
21+ ~zod/try=> `coin`(need (slay '0x2b59'))
22+ [%$ p=[p=~.ux q=11.097]]
23+
24+ ~zod/try=> ~(rend co [%many ~[[%$ %ud 1] [%$ %tas 'a'] [%$ %s -2]]])
25+ "._1_a_-2__"
26+ ~zod/try=> ._1_a_-2__
27+ [1 %a -2]
28+
29+ ~zod/try=> `@uv`(jam [3 4])
30+ 0v2cd1
31+ ~zod/try=> (slay '~02cd1')
32+ [~ [%blob p=[3 4]]]
33+ ~zod/try=> ~02cd1
34+ [3 4]
35+
36+
docs/system/hoon/library/mold/cord.mdnew file+28
@@ -0,0 +1,28 @@
1+### `++cord`
2+
3+UTF-8 text
4+
5+One of Hoon's two string types (the other being [`++tape`]()). A cord is an
6+atom of UTF-8 text. [`++trip`]() and [`++crip`]() convert between cord and
7+`++tape`.
8+
9+Source
10+------
11+
12+ ++ cord ,@t :: text atom (UTF-8)
13+
14+Examples
15+--------
16+
17+Odor [`@t`]() designates a Unicode atom, little-endian: the first character
18+in the text is the low byte.
19+
20+ ~zod/try=> `@ux`'foobar'
21+ 0x7261.626f.6f66
22+
23+ ~zod/try=> `@`'urbit'
24+ 499.984.265.845
25+ ~zod/try=> (cord 499.984.265.845)
26+ 'urbit'
27+
28+
docs/system/hoon/library/mold/date.mdnew file+20
@@ -0,0 +1,20 @@
1+### `++date`
2+
3+Point in time
4+
5+A boolean designating AD or BC, a year atom, a month
6+atom, and a [`++tarp`](), which is a day atom and a time.
7+
8+Source
9+------
10+
11+ ++ date ,[[a=? y=@ud] m=@ud t=tarp] :: parsed date
12+
13+Examples
14+--------
15+
16+See also: [`++year`](), [`++yore`]() [`++stud`](), [`++dust`]()
17+
18+ ~zod/try=> `date`(yore ~2014.6.6..21.09.15..0a16)
19+ [[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
20+
docs/system/hoon/library/mold/dime.mdnew file+21
@@ -0,0 +1,21 @@
1+### `++dime`
2+
3+Odor-atom pair
4+
5+Used in [`++coin`](). Convenience methods [`++scot`]() and [`++scow`]() (in
6+Section 2eL) print dimes as [`++cord`]() and [`++tape`](), respectively.
7+[`++slat`](), [`++slav`](), and [`++slaw`]() are used to parse atoms of
8+specific [odor]()s.
9+
10+Source
11+------
12+
13+ ++ dime ,[p=@ta q=@] ::
14+
15+Examples
16+--------
17+
18+ ~zod/try=> +>:(slay '0x123')
19+ p=[p=~.ux q=291]
20+
21+
docs/system/hoon/library/mold/each.mdnew file+19
@@ -0,0 +1,19 @@
1+### `++each`
2+
3+Mold of fork between two
4+
5+[mold]() generator: produces a dicriminated [fork]() between two types.
6+
7+Source
8+------
9+
10+ ++ each |*([a=$+(* *) b=$+(* *)] $%([& p=a] [| p=b])) :: either a or b
11+
12+Examples
13+--------
14+
15+ ~zod/try=> :type; *(each cord time)
16+ [%.y p='']
17+ {[%.y p=@t] [%.n p=@da]}
18+
19+
docs/system/hoon/library/mold/edge.mdnew file+22
@@ -0,0 +1,22 @@
1+### `++edge`
2+
3+Parsing location metadata
4+
5+Optional result `p` and parsing continuation `q`.
6+
7+Source
8+------
9+
10+ ++ edge ,[p=hair q=(unit ,[p=* q=nail])] :: parsing output
11+
12+Examples
13+--------
14+
15+See also: Section 2eD, [`++rule`]()
16+
17+ ~zod/try=> *edge
18+ [p=[p=0 q=0] q=~]
19+ ~zod/try=> (tall:vast [1 1] "a b")
20+ [p=[p=1 q=2] q=[~ [p=[%cnzz p=~[%a]] q=[p=[p=1 q=2] q=" b"]]]]
21+
22+
docs/system/hoon/library/mold/foot.mdnew file+31
@@ -0,0 +1,31 @@
1+### `++foot`
2+
3+Cases of arms by variance model.
4+
5+`%ash` arms are [`dry`]() and [geometric]().
6+
7+Source
8+------
9+
10+ ++ foot $% [%ash p=twig] :: dry arm, geometric
11+ [%elm p=twig] :: wet arm, generic
12+ [%oak ~] :: XX not used
13+ [%yew p=(map term foot)] :: XX not used
14+ == ::
15+
16+Examples
17+--------
18+
19+See also: [`++ap`](), [`++ut`]()
20+
21+ ~zod/try=> *foot
22+ [%yew p={}]
23+
24+ ~zod/try=> (ream '|% ++ $ foo --')
25+ [%brcn p={[p=%$ q=[%ash p=[%cnzz p=~[%foo]]]]}]
26+ ~zod/try=> +<+:(ream '|% ++ $ foo --')
27+ t=~[%ash %cnzz %foo]
28+ ~zod/try=> (foot +<+:(ream '|% ++ $ foo --'))
29+ [%ash p=[%cnzz p=~[%foo]]]
30+ ~zod/try=> (foot +<+:(ream '|% +- $ foo --'))
31+ [%elm p=[%cnzz p=~[%foo]]]
docs/system/hoon/library/mold/gate.mdnew file+29
@@ -0,0 +1,29 @@
1+### `++gate`
2+
3+Function
4+
5+A core with one arm, `$`--the empty name--which transforms a sample noun into a product
6+noun. If used [dryly]() as a type, the [subject]() must have a sample type of [`*`]().
7+
8+
9+Source
10+------
11+
12+ ++ gate $+(* *) :: general gate
13+
14+Examples
15+--------
16+
17+See also: [`++lift`](), [`++cork`]()
18+
19+ ~zod/try=> *gate
20+ <1|mws [* <101.jzo 1.ypj %164>]>
21+ ~zod/try=> `gate`|=(* 0)
22+ <1|mws [* <101.jzo 1.ypj %164>]>
23+
24+ ~zod/try=> (|=(a=* [a 'b']) 'c')
25+ [99 'b']
26+ ~zod/try=> (`gate`|=(a=* [a 'b']) 'c')
27+ [99 98]
28+
29+
docs/system/hoon/library/mold/hair.mdnew file+25
@@ -0,0 +1,25 @@
1+### `++hair`
2+
3+Parsing line and column
4+
5+A pair of two [`@ud`]() used in parsing indicating line and column number.
6+
7+Source
8+------
9+
10+ ++ hair ,[p=@ud q=@ud] :: parsing trace
11+
12+Examples
13+--------
14+
15+ ~zod/try=> *hair
16+ [p=0 q=0]
17+
18+ ~zod/try=> `hair`[1 1] :: parsing starts at [1 1] as a convention.
19+ [p=1 q=1]
20+ ~zod/try=> ((plus ace) [1 1] " --")
21+ [p=[p=1 q=4] q=[~ u=[p=[~~. " "] q=[p=[p=1 q=4] q="--"]]]]
22+ ~zod/try=> `hair`p:((plus ace) [1 1] " --")
23+ [p=1 q=4]
24+
25+
docs/system/hoon/library/mold/jar.mdnew file+30
@@ -0,0 +1,30 @@
1+### `++jar`
2+
3+
4+Tile generator. A [`++jar`]() is a [`++map`]() of [`++list`]().
5+
6+Source
7+------
8+
9+ ++ jar |*([a=_,* b=_,*] (map a (list b))) :: map of lists
10+
11+Examples
12+--------
13+
14+See also: [`++ja`](), [`++by`](), [`++map`](), [`++list`]()
15+
16+ ~zod/try=> =a (limo [1 2 ~])
17+ ~zod/try=> a
18+ [i=1 t=[i=2 t=~]]
19+ ~zod/try=> =b (limo [3 4 ~])
20+ ~zod/try=> b
21+ [i=3 t=[i=4 t=~]]
22+ ~zod/try=> =c (mo (limo [[%a a] [%b b] ~]))
23+ ~zod/try=> c
24+ {[p=%a q=[i=1 t=[i=2 t=~]]] [p=%b q=[i=3 t=[i=4 t=~]]]}
25+ ~zod/try=> (~(get ja c) %a)
26+ [i=1 t=[i=2 t=~]]
27+ ~zod/try=> (~(get ja c) %c)
28+ ~
29+
30+
docs/system/hoon/library/mold/jug.mdnew file+28
@@ -0,0 +1,28 @@
1+### `++jug`
2+
3+[mold]() generator. A `++jug` is a [`++map`]() of [`++set`]()s.
4+
5+Source
6+------
7+
8+ ++ jug |*([a=_,* b=_,*] (map a (set b))) :: map of sets
9+
10+Examples
11+--------
12+
13+See also: `++ju`, `++by`, `++map`, `++set`
14+
15+ ~zod/try=> =a (sa (limo [1 2 ~]))
16+ ~zod/try=> a
17+ {1 2}
18+ ~zod/try=> =b (sa (limo [3 4 ~]))
19+ ~zod/try=> b
20+ {4 3}
21+ ~zod/try=> =c (mo (limo [[%a a] [%b b] ~]))
22+ ~zod/try=> c
23+ {[p=%a q={1 2}] [p=%b q={4 3}]}
24+ ~zod/try=> (~(get ju c) %b)
25+ {4 3}
26+ ~zod/try=> (~(put ju c) [%b 5])
27+ {[p=%a q={1 2}] [p=%b q={5 4 3}]}
28+
docs/system/hoon/library/mold/like.mdnew file+27
@@ -0,0 +1,27 @@
1+### `++like`
2+
3+Mold generator for an edge
4+
5+`++like` generates an `++edge` with a parsed result set to a specific type.
6+
7+Source
8+------
9+
10+ ++ like |* a=_,* :: generic edge
11+ ?@ +.b ~ ::
12+ :- ~ ::
13+ u=[p=(a +>-.b) q=[p=(hair -.b) q=(tape +.b)]] ::
14+
15+Examples
16+--------
17+ ~zod/try=> *(like char)
18+ [p=[p=0 q=0] q=~]
19+
20+ ~zod/try=> (ace [1 1] " a")
21+ [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
22+ ~zod/try=> `(like char)`(ace [1 1] " a")
23+ [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
24+ ~zod/try=> `(like ,@)`(ace [1 1] " a")
25+ [p=[p=1 q=2] q=[~ [p=32 q=[p=[p=1 q=2] q="a"]]]]
26+
27+
docs/system/hoon/library/mold/limb.mdnew file+18
@@ -0,0 +1,18 @@
1+### `++limb`
2+
3+ ++ limb $|(term $%([%& p=axis] [%| p=@ud q=term])) ::
4+
5+XX move to `++ut`
6+
7+Reference into subject by name/axis
8+
9+See also: section 2fC-2fD
10+
11+ ~zod/try=> (ream '^^$')
12+ [%cnzz p=~[[%.n p=2 q=%$]]]
13+ ~zod/try=> (limb &2:(ream '^^$'))
14+ [%.n p=2 q=%$]
15+ ~zod/try=> (limb &2:(ream '^^^$'))
16+ [%.n p=3 q=%$]
17+
18+
docs/system/hoon/library/mold/line.mdnew file+28
@@ -0,0 +1,28 @@
1+### `++line`
2+
3+XX move to `++ut`
4+
5+Source
6+------
7+
8+ ++ line ,[p=[%leaf p=odor q=@] q=tile] :: %kelp case
9+
10+
11+Examples
12+--------
13+
14+ ~zod/try=> (ream '$%([1 a] [%2 b])')
15+ [ %bccm
16+ p
17+ [ %kelp
18+ p
19+ [ i=[p=[%leaf p=~.ud q=1] q=[%herb p=[%cnzz p=~[%a]]]]
20+ t=~[[p=[%leaf p=~.ud q=2] q=[%herb p=[%cnzz p=~[%b]]]]]
21+ ]
22+ ]
23+ ]
24+ ~zod/try=> &3:(ream '$%([1 a] [%2 b])')
25+ p=[p=[%leaf p=%ud q=1] q=[%herb p=[%cnzz p=~[%a]]]]
26+ ~zod/try=> (line &3:(ream '$%([1 a] [%2 b])'))
27+ [p=[%leaf p=~.ud q=1] q=[%herb p=[%cnzz p=~[%a]]]]
28+
docs/system/hoon/library/mold/list.mdnew file+26
@@ -0,0 +1,26 @@
1+### `++list`
2+
3+List
4+
5+[mold]() generator. `++list` generates a mold of a null-termanated list of a
6+homogenous type.
7+
8+
9+Source
10+------
11+
12+ ++ list |* a=_,* :: null-term list
13+
14+Examples
15+--------
16+
17+See also: [`++turn`](), [`++snag`]()
18+
19+ ~zod/try=> *(list)
20+ ~
21+ ~zod/try=> `(list ,@)`"abc"
22+ ~[97 98 99]
23+ ~zod/try=> (snag 0 "abc")
24+ ~~a
25+
26+
docs/system/hoon/library/mold/lone.mdnew file+12
@@ -0,0 +1,12 @@
1+### `++lone`
2+
3+Tile generator. `++lone` puts face of `p` on something.
4+
5+XX unused
6+
7+Source
8+------
9+
10+ ++ lone |*(a=$+(* *) ,p=a) :: just one thing
11+
12+
docs/system/hoon/library/mold/mane.mdnew file+26
@@ -0,0 +1,26 @@
1+### `++mane`
2+
3+XML name
4+
5+An XML name (tag name or attribute name) with an optional namespace. Parsed by
6+[`++name`]() within [`++poxa`](), rendered by [`++name`]() within `++poxo`.
7+
8+Source
9+------
10+
11+ ++ mane $|(@tas [@tas @tas]) :: XML name/space
12+
13+Examples
14+--------
15+
16+See also: [`++sail`]()
17+
18+ ~zod/try=> *mane
19+ %$
20+
21+ ~zod/try=> `mane`n.g:`manx`;div:namespace;
22+ %div
23+ ~zod/try=> `mane`n.g:`manx`;div_namespace;
24+ [%div %namespace]
25+
26+
docs/system/hoon/library/mold/manx.mdnew file+17
@@ -0,0 +1,17 @@
1+### `++manx`
2+
3+XML node.
4+
5+Parsed by [`++apex`]() within [`++poxa`](), rendered by [`++poxo`]().
6+
7+Source
8+------
9+
10+ ++ manx ,[g=marx c=marl] :: XML node
11+
12+Examples
13+--------
14+
15+See also: [`++sail`]() doc
16+
17+
docs/system/hoon/library/mold/map.mdnew file+25
@@ -0,0 +1,25 @@
1+### `++map`
2+
3+Map
4+
5+[mold]() generator. A `++map` is a [treap](http://en.wikipedia.org/wiki/Treap) of
6+key, value pairs.
7+
8+
9+Source
10+------
11+
12+ ++ map |* [a=_,* b=_,*] :: associative tree
13+
14+Examples
15+--------
16+
17+See also: [`++by`]()
18+
19+ ~zod/try=> :type; *(map ,@t ,@u)
20+ {}
21+ nlr([p=@t q=@u])
22+ ~zod/try=> `(map ,@ta ,@ud)`(mo (limo a/1 b/2 ~))
23+ {[p=~.a q=1] [p=~.b q=2]}
24+
25+
docs/system/hoon/library/mold/marl.mdnew file+16
@@ -0,0 +1,16 @@
1+### `++marl`
2+
3+List of XML nodes
4+
5+A list of [`++manx`]().
6+
7+Source
8+------
9+
10+ ++ marl (list manx) :: XML node list
11+
12+Examples
13+--------
14+
15+
16+
docs/system/hoon/library/mold/mars.mdnew file+15
@@ -0,0 +1,15 @@
1+### `++mars`
2+
3+XML CDATA
4+
5+Implicitly produced by [`++chrd`]() within [`++poxa`]()
6+
7+Source
8+------
9+
10+ ++ mars ,[t=[n=%$ a=[i=[n=%$ v=tape] t=~]] c=~] :: XML cdata
11+
12+Examples
13+--------
14+
15+
docs/system/hoon/library/mold/mart.mdnew file+18
@@ -0,0 +1,18 @@
1+### `++mart`
2+
3+List of XML attributes
4+
5+Each `++mart` is a list of pairs of [`++mane`]() and
6+[`++tape`]().
7+
8+Parsed by [`++attr`]() within [`++poxa`](), rendered by `++attr` within [`++poxo`]()
9+
10+Source
11+------
12+
13+ ++ mart (list ,[n=mane v=tape]) :: XML attributes
14+
15+Examples
16+--------
17+
18+
docs/system/hoon/library/mold/marx.mdnew file+16
@@ -0,0 +1,16 @@
1+### `++marx`
2+
3+XML tag
4+
5+A `++marx` is a pair of a tag name, `++mane` and a list of attributes,
6+`++mart`. Parsed by [`++head`]() `++poxa`, rendered within `++poxo`.
7+
8+Source
9+------
10+
11+ ++ marx ,[n=mane a=mart] :: XML tag
12+
13+Examples
14+--------
15+
16+
docs/system/hoon/library/mold/metl.mdnew file+9
@@ -0,0 +1,9 @@
1+### `++metl`
2+
3+ ++ metl ?(%gold %iron %zinc %lead) :: core variance
4+
5+XX move to `++ut`
6+
7+See also: [`++coil`]()
8+
9+
docs/system/hoon/library/mold/nail.mdnew file+19
@@ -0,0 +1,19 @@
1+### `++nail`
2+
3+Location, remainder of parsed text
4+
5+Indicates parsing position `p`, and remaining text to be parsed `q`.
6+
7+Source
8+------
9+
10+ ++ nail ,[p=hair q=tape] :: parsing input
11+
12+Examples
13+--------
14+
15+ ~zod/try=> +<:;~(plug cab cab)
16+ c=tub=[p=[p=0 q=0] q=""]
17+ ~zod/try=> :: tub is a ++nail
18+
19+
docs/system/hoon/library/mold/nock.mdnew file+29
@@ -0,0 +1,29 @@
1+### `++nock`
2+
3+Virtual machine. See [Nock doc]().
4+
5+
6+Source
7+------
8+
9+ ++ nock $& [p=nock q=nock] :: autocons
10+ [%3 p=nock] :: cell test
11+ [%4 p=nock] :: increment
12+ [%5 p=nock q=nock] :: equality test
13+ [%6 p=nock q=nock r=nock] :: if, then, else
14+ [%7 p=nock q=nock] :: serial compose
15+ [%8 p=nock q=nock] :: push onto subject
16+ [%9 p=@ q=nock] :: select arm and fire
17+ [%10 p=?(@ [p=@ q=nock]) q=nock] :: hint
18+ [%11 p=nock] :: grab data from sky
19+ == ::
20+
21+Examples
22+--------
23+
24+ ~zod/try=> !=([+(.) 20 -<])
25+ [[4 0 1] [1 20] 0 4]
26+ ~zod/try=> (nock !=([+(.) 20]))
27+ [p=[%4 p=[%0 p=1]] q=[%1 p=20]]
28+
29+
docs/system/hoon/library/mold/noun.mdnew file+10
@@ -0,0 +1,10 @@
1+### `++noun`
2+
3+ ++ noun ,* :: any noun
4+
5+Used nowhere XX
6+
7+ ~zod/try=> `noun`~[1 2 3]
8+ [1 2 3 0]
9+
10+
docs/system/hoon/library/mold/null.mdnew file+11
@@ -0,0 +1,11 @@
1+### `++null`
2+
3+ ++ null ,~ :: null, nil, etc
4+
5+Used nowhere XX
6+
7+ ~zod/try=> :type; *null
8+ ~
9+ %~
10+
11+
docs/system/hoon/library/mold/numb.mdnew file+6
@@ -0,0 +1,6 @@
1+### `++numb`
2+
3+ ++ numb ,@ :: just a number
4+
5+Used nowhere XX
6+
docs/system/hoon/library/mold/odor.mdnew file+22
@@ -0,0 +1,22 @@
1+### `++odor`
2+
3+'type' of atom
4+
5+By convention, a short name for a category of atom. `++odor` is
6+circularly defined, with [`@ta`]() being the `++odor` of the ASCII subset
7+commonly used in urbit.
8+
9+Source
10+------
11+
12+ ++ odor ,@ta :: atom format
13+
14+Examples
15+--------
16+
17+See also: [`++base`](), [odor reference]()
18+
19+ ~zod/try=> `odor`%ux
20+ ~.ux
21+
22+
docs/system/hoon/library/mold/pair.mdnew file+20
@@ -0,0 +1,20 @@
1+### `++pair`
2+
3+Mold of pair of types
4+
5+[mold]() generator. Produces a tuple of two of the types passed in.
6+
7+
8+Source
9+------
10+
11+ ++ pair |*([a=$+(* *) b=$+(* *)] ,[p=a q=b]) :: just a pair
12+
13+
14+Examples
15+--------
16+
17+ ~zod/try=> *(pair bean cord)
18+ [p=%.y q='']
19+
20+
docs/system/hoon/library/mold/pass.mdnew file+12
@@ -0,0 +1,12 @@
1+### `++pass`
2+
3+Atom alias
4+
5+Used primarily in crypto.
6+
7+Source
8+------
9+
10+ ++ pass ,@ :: public key
11+
12+
docs/system/hoon/library/mold/path.mdnew file+19
@@ -0,0 +1,19 @@
1+### `++path`
2+
3+Filesystem path
4+
5+A `++path` is a list of [`++span`]()s aka [`@ta`](). Used in
6+`%clay` and `%eyre` extensively.
7+
8+Source
9+------
10+
11+ ++ path (list span) :: filesys location
12+
13+Examples
14+--------
15+
16+ ~zod/try=> `path`"abc"
17+ /a/b/c
18+
19+
docs/system/hoon/library/mold/pint.mdnew file+22
@@ -0,0 +1,22 @@
1+### `++pint`
2+
3+Parsing range
4+
5+Mostly used for stacktraces. A `++pint` is a pair of
6+[`++hair`](), indicating from `p` to `q`.
7+
8+Source
9+------
10+
11+ ++ pint ,[p=[p=@ q=@] q=[p=@ q=@]] :: line/column range
12+
13+Examples
14+--------
15+
16+ ~zod/try=> !:(!!)
17+ ! /~zod/try/~2014.9.20..01.22.04..52e3/:<[1 4].[1 6]>
18+ ~zod/try=> :: !! always produces a crash
19+ ~zod/try=> `pint`[[1 4] [1 6]]
20+ [p=[p=1 q=4] q=[p=1 q=6]]
21+
22+
docs/system/hoon/library/mold/pole.mdnew file+18
@@ -0,0 +1,18 @@
1+### `++pole`
2+
3+Faceless list
4+
5+A [`++list`]() without the [face]()s `i` and `t`.
6+
7+Source
8+------
9+
10+ ++ pole |* a=_,* :: nameless list
11+
12+Examples
13+--------
14+
15+ ~zod/try=> `(pole char)`"asdf"
16+ [~~a [~~s [~~d [~~f ~]]]]
17+
18+
docs/system/hoon/library/mold/port.mdnew file+23
@@ -0,0 +1,23 @@
1+### `++port`
2+
3+XX move to `++ut`
4+
5+Type and location of core-shaped thing? XX Compiler Internals
6+
7+Source
8+------
9+
10+ ++ port $: p=axis ::
11+ $= q ::
12+ $% [%& p=type] ::
13+ [%| p=axis q=(list ,[p=type q=foot])] ::
14+ == ::
15+ == ::
16+
17+Examples
18+--------
19+
20+ ~zod/try=> *port
21+ [p=0 q=[%.y p=%void]]
22+
23+
docs/system/hoon/library/mold/post.mdnew file+22
@@ -0,0 +1,22 @@
1+### `++post`
2+
3+XX move to `++ut`
4+
5+Type and location of possibly core-shaped thing? XX Compiler Internals
6+
7+Source
8+------
9+
10+ ++ post $: p=axis ::
11+ $= q ::
12+ $% [0 p=type] ::
13+ [1 p=axis q=(list ,[p=type q=foot])] ::
14+ [2 p=twin q=type] ::
15+ == ::
16+ == ::
17+
18+Examples
19+--------
20+
21+ ~zod/try=> *post
22+ [p=0 q=[%0 p=%void]]
docs/system/hoon/library/mold/prop.mdnew file+10
@@ -0,0 +1,10 @@
1+### `++prop`
2+
3+XX move to `++ut`
4+
5+Verified core-shaped thing? XX Compiler Internals
6+
7+ ~zod/try=> *prop
8+ [p=0 q=[p=~ q=~]]
9+
10+
docs/system/hoon/library/mold/qeu.mdnew file+24
@@ -0,0 +1,24 @@
1+### `++qeu`
2+
3+Queue
4+
5+[mold]() generator. An ordered [treap](http://en.wikipedia.org/wiki/Treap) of
6+items.
7+
8+Source
9+------
10+
11+ ++ qeu |* a=_,* :: queue
12+ $|(~ [n=a l=(qeu a) r=(qeu a)]) ::
13+
14+See also: [`++to`]()
15+
16+Examples
17+--------
18+
19+ ~zod/try=> (qeu time)
20+ <1.qyo [* <1.sxx [a=<1.ebd [* <101.jzo 1.ypj %164>]> <101.jzo 1.ypj %164>]>]>
21+ ~zod/try=> (~(gas to *(qeu time)) [~2014.1.1 ~2014.1.2 ~])
22+ {~2014.1.2 ~2014.1.1}
23+
24+
docs/system/hoon/library/mold/qual.mdnew file+18
@@ -0,0 +1,18 @@
1+### `++qual`
2+
3+Mold of 4 type tuple
4+
5+A `++qual` is a tuple of four of the types passed in.
6+
7+Source
8+------
9+
10+ ++ qual |* [a=$+(* *) b=$+(* *) c=$+(* *) d=$+(* *)] :: just a quadruple
11+
12+Examples
13+--------
14+
15+ ~zod/try=> *(qual date time tape cord)
16+ [p=[[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]] q=~292277024401-.1.1 r="" s='']
17+
18+
docs/system/hoon/library/mold/rege.mdnew file+34
@@ -0,0 +1,34 @@
1+### `++rege`
2+
3+Regex caases
4+
5+`++rege` defines the cases of a regular expression.
6+
7+Source
8+------
9+
10+ ++ rege $| ?(%dote %ende %sart %empt %boun %bout) :: parsed regex
11+ [%brac p=@] :: p is 256 bitmask
12+ [%eith p=rege q=rege] :: either
13+ [%mant p=rege] :: greedy 0 or more
14+ [%plls p=rege] :: greedy 1 or more
15+ [%betw p=rege q=@u r=@u] :: between q and r
16+ [%bint p=rege q=@u] :: min q
17+ [%bant p=rege q=@u] :: exactly q
18+ [%manl p=rege] :: lazy 0 or more
19+ [%plll p=rege] :: lazy 1 or more
20+ [%betl p=rege q=@u r=@u] :: between q and r lazy
21+ [%binl p=rege q=@u] :: min q lazy
22+ == ::
23+
24+Examples
25+--------
26+
27+See also: [`++rexp`](), [`++repg`](), [`++pars`]()
28+
29+ ~zod/try=> (pars "[a-z]")
30+ [~ [%brac p=10.633.823.807.823.001.954.701.781.295.154.855.936]]
31+ ~zod/try=> (rexp "[a-z]" "abc1")
32+ [~ [~ {[p=0 q="a"]}]]
33+
34+
docs/system/hoon/library/mold/ring.mdnew file+12
@@ -0,0 +1,12 @@
1+### `++ring`
2+
3+Atom alias
4+
5+Used primarily in crypto.
6+
7+Source
8+------
9+
10+ ++ ring ,@ :: private key
11+
12+
docs/system/hoon/library/mold/rule.mdnew file+27
@@ -0,0 +1,27 @@
1+### `++rule`
2+
3+Parsing rule
4+
5+`++rule` is an empty parsing rule, but it is used to check
6+that parsing rules match this with `_`.
7+
8+
9+Source
10+------
11+
12+ ++ rule |=(tub=nail `edge`[p.tub ~ ~ tub]) :: parsing rule
13+
14+Examples
15+--------
16+
17+ ~zod/try=> *rule
18+ [p=[p=0 q=0] q=[~ [p=0 q=[p=[p=0 q=0] q=""]]]]
19+
20+ ~zod/try=> ^+(rule [|=(a=nail [p.a ~])]:|6)
21+ <1.dww [tub=[p=[p=@ud q=@ud] q=""] <101.jzo 1.ypj %164>]>
22+ ~zod/try=> (^+(rule [|=(a=nail [p.a ~ u=['a' a]])]:|6) [1 1] "hi")
23+ [p=[p=1 q=1] q=[~ [p=97 q=[p=[p=1 q=1] q="hi"]]]]
24+ ~zod/try=> ([|=(a=nail [p.a ~ u=['a' a]])]:|6 [1 1] "hi")
25+ [[p=1 q=1] ~ u=['a' p=[p=1 q=1] q="hi"]]
26+
27+
docs/system/hoon/library/mold/set.mdnew file+26
@@ -0,0 +1,26 @@
1+### `++set`
2+
3+Set
4+
5+[mold]() generator. A `++set` is a
6+[treap](http://en.wikipedia.org/wiki/Treap) with unique values.
7+
8+Source
9+------
10+
11+ ++ set |* a=_,* :: set
12+ $|(~ [n=a l=(set a) r=(set a)]) ::
13+
14+Examples
15+--------
16+
17+See also: [`++in`]()
18+
19+ ~zod/try=> (sa "abc")
20+ {~~a ~~c ~~b}
21+ ~zod/try=> (~(put in (sa "abc")) %d)
22+ {~~d ~~a ~~c ~~b}
23+ ~zod/try=> (~(put in (sa "abc")) %a)
24+ {~~a ~~c ~~b}
25+
26+
docs/system/hoon/library/mold/span.mdnew file+30
@@ -0,0 +1,30 @@
1+### `++span`
2+
3+ASCII atom
4+
5+A restricted text atom for canonical atom syntaxes. The prefix is `~.`.
6+There are no escape sequences except `~~`, which means `~`, and `~-`,
7+which means `_`. `-` and `.` encode themselves. No other characters
8+besides numbers and lowercase letters are permitted.
9+
10+Source
11+------
12+
13+ ++ span ,@ta :: text-atom (ASCII)
14+Examples
15+--------
16+ ~zod/try=> *span
17+ ~.
18+
19+ ~zod/try=> `@t`~.foo
20+ 'foo'
21+ ~zod/try=> `@t`~.foo.bar
22+ 'foo.bar'
23+ ~zod/try=> `@t`~.foo~~bar
24+ 'foo~bar'
25+ ~zod/try=> `@t`~.foo~-bar
26+ 'foo_bar'
27+ ~zod/try=> `@t`~.foo-bar
28+ 'foo-bar'
29+
30+
docs/system/hoon/library/mold/spot.mdnew file+21
@@ -0,0 +1,21 @@
1+### `++spot`
2+
3+Stack trace line
4+
5+A [`++spot`]() is what we print after crashing.
6+
7+Source
8+------
9+
10+ ++ spot ,[p=path q=pint] :: range in file
11+
12+Examples
13+--------
14+
15+ ~zod/try=> :into /=main=/bin/fail/hoon '!: !!'
16+ + /~zod/main/359/bin/fail/hoon
17+ ~zod/try=> :fail
18+ ! /~zod/main/~2014.9.22..18.40.56..ef04/bin/fail/:<[1 5].[1 7]>
19+ ! exit
20+
21+
docs/system/hoon/library/mold/tang.mdnew file+7
@@ -0,0 +1,7 @@
1+### `++tang`
2+
3+ ++ tang (list tank) :: general error
4+
5+Unused XX
6+
7+
docs/system/hoon/library/mold/tank.mdnew file+39
@@ -0,0 +1,39 @@
1+### `++tank`
2+
3+Pretty-printing structure.
4+
5+A `++tank` is one of three cases: a `%leaf`
6+is simply a string; a `%palm` is XX need more information; and a `%rose` is a
7+list of `++tank` delimted by the strings in `p`.
8+
9+
10+Source
11+------
12+
13+ ++ tank $% [%leaf p=tape] :: printing formats
14+ $: %palm :: backstep list
15+ p=[p=tape q=tape r=tape s=tape] ::
16+ q=(list tank) ::
17+ == ::
18+ $: %rose :: flat list
19+ p=[p=tape q=tape r=tape] :: mid open close
20+ q=(list tank) ::
21+ == ::
22+ ==
23+
24+Examples
25+--------
26+
27+ ~zod/try=> >(bex 20) (bex 19)<
28+ [%rose p=[p=" " q="[" r="]"] q=~[[%leaf p="1.048.576"] [%leaf p="524.288"]]]
29+ ~zod/try=> (wash [0 80] >(bex 20) (bex 19)<) :: at 80 cols
30+ <<"[1.048.576 524.288]">>
31+ ~zod/try=> (wash [0 15] >(bex 20) (bex 19)<) :: at 15 cols (two lines)
32+ <<"[ 1.048.576" " 524.288" "]">>
33+
34+ ~zod/try=> [(bex 150) (bex 151)] :: at 80 cols
35+ [ 1.427.247.692.705.959.881.058.285.969.449.495.136.382.746.624
36+ 2.854.495.385.411.919.762.116.571.938.898.990.272.765.493.248
37+ ]
38+
39+
docs/system/hoon/library/mold/tape.mdnew file+21
@@ -0,0 +1,21 @@
1+
2+### `++tape`
3+
4+List of chars
5+
6+One of Hoon's two string types, the other being [`++cord`](). A tape is a
7+list of chars.
8+
9+Source
10+------
11+
12+ ++ tape (list char) :: like a string
13+
14+Examples
15+--------
16+
17+ ~zod/try=> `(list ,char)`"foobar"
18+ "foobar"
19+ ~zod/try=> `(list ,@)`"foobar"
20+ ~[102 111 111 98 97 114]
21+
docs/system/hoon/library/mold/tarp.mdnew file+27
@@ -0,0 +1,27 @@
1+### `++tarp`
2+
3+Day through second
4+
5+The remaining part of a [`++date`](): day, hour, minute, second and a list
6+of [`@ux`]() for precision.
7+
8+Source
9+------
10+
11+ @ud h=@ud m=@ud s=@ud f=(list ,@ux)] :: parsed time
12+
13+Examples
14+--------
15+
16+See also: [`++date`](), [`++yell`[]()/`++yule`]()
17+
18+ ~zod/try=> -<-
19+ ~2014.9.20..00.43.33..b52a
20+ ~zod/try=> :: the time is always in your context at -<-
21+ ~zod/try=> (yell -<-)
22+ [d=106.751.991.820.278 h=0 m=43 s=39 f=~[0x54d1]]
23+
24+ ~zod/try=> (yell ~d20)
25+ [d=20 h=0 m=0 s=0 f=~]
26+
27+
docs/system/hoon/library/mold/term.mdnew file+28
@@ -0,0 +1,28 @@
1+### `++term`
2+
3+Hoon constants
4+
5+A restricted text atom for Hoon constants. The only characters permitted are
6+lowercase ASCII, `-`, and `0-9`, the latter two of which can neither be the first or last
7+character. The syntax for [`@tas`]() is the text itself, always preceded by `%`.
8+This means a term is always [cubical](). The empty `@tas` has a special syntax,
9+`$`.
10+
11+
12+Source
13+------
14+
15+ ++ term ,@tas :: Hoon ASCII subset
16+
17+Examples
18+--------
19+
20+ ~zod/try=> *term
21+ %$
22+
23+ ~zod/try=> %dead-fish9
24+ %dead-fish9
25+ ~zod/try=> -:!>(%dead-fish9)
26+ [%cube p=271.101.667.197.767.630.546.276 q=[%atom p=%tas]]
27+
28+
docs/system/hoon/library/mold/tiki.mdnew file+34
@@ -0,0 +1,34 @@
1+### `++tiki`
2+
3+XX move to `++ut`
4+
5+Source
6+------
7+
8+ ++ tiki :: test case
9+
10+Examples
11+--------
12+
13+A `++wing` or `++twig`.
14+
15+ ~zod/try=> (ream '=+ a=4 ?-(a @ ~)')
16+ [ %tsls
17+ p=[%ktts p=p=%a q=[%dtzy p=%ud q=4]]
18+ q
19+ [ %wthz
20+ p=[%.y p=~ q=~[%a]]
21+ q=~[[p=[%axil p=[%atom p=~.]] q=[%bczp p=%null]]]
22+ ]
23+ ]
24+ ~zod/try=> (ream '=+ a=4 ?-(4 @ ~)')
25+ [ %tsls
26+ p=[%ktts p=p=%a q=[%dtzy p=%ud q=4]]
27+ q
28+ [ %wthz
29+ p=[%.n p=~ q=[%dtzy p=%ud q=4]]
30+ q=~[[p=[%axil p=[%atom p=~.]] q=[%bczp p=%null]]]
31+ ]
32+ ]
33+
34+
docs/system/hoon/library/mold/time.mdnew file+23
@@ -0,0 +1,23 @@
1+### `++time`
2+
3+Absolute date
4+
5+The `@da` odor designates an absolute date atom.
6+
7+Source
8+------
9+
10+ ++ time ,@da :: galactic time
11+
12+Examples
13+--------
14+
15+See also: [`++date`](), [odor reference]()
16+
17+ ~zod/try=> `time`-<-
18+ ~2014.9.25..20.01.47..eeac
19+ ~zod/try=> :: the time is always in your context at -<-
20+ ~zod/try=> `time`~2014.1.1
21+ ~2014.1.1
22+
23+
docs/system/hoon/library/mold/tine.mdnew file+30
@@ -0,0 +1,30 @@
1+### `++tine`
2+
3+Switch statement cases
4+
5+In [`?-`](), for example, your list of cases is a `++tine`.
6+
7+Source
8+------
9+
10+ ++ tine (list ,[p=tile q=twig]) ::
11+
12+Examples
13+--------
14+
15+ ~zod/try=> (ream '?-(!! @ |, ^ &)')
16+ [ %wthz
17+ p=[%.n p=~ q=[%zpzp ~]]
18+ q
19+ ~[
20+ [p=[%axil p=[%atom p=~.]] q=[%dtzy p=%f q=1]]
21+ [p=[%axil p=%cell] q=[%dtzy p=%f q=0]]
22+ ]
23+ ]
24+ ~zod/try=> (tine |2:(ream '?-(!! @ |, ^ &)'))
25+ ~[
26+ [p=[%axil p=[%atom p=~.]] q=[%dtzy p=%f q=1]]
27+ [p=[%axil p=%cell] q=[%dtzy p=%f q=0]]
28+ ]
29+
30+
docs/system/hoon/library/mold/toga.mdnew file+40
@@ -0,0 +1,40 @@
1+### `++toga`
2+
3+Tree of faces
4+
5+A [face](), or tree of faces. A `++toga` is applied to anything assigned
6+using [`^=`]().
7+
8+XX move to `++ut` and rune doc (for \^= examples)
9+
10+Source
11+------
12+
13+ ++ toga :: face control
14+ [2 p=toga q=toga] :: cell toga
15+ == ::
16+
17+Examples
18+--------
19+
20+ ~zod/try=> a=1
21+ a=1
22+ ~zod/try=> (ream 'a=1')
23+ [%ktts p=p=%a q=[%dtzy p=%ud q=1]]
24+ ~zod/try=> [a b]=[1 2 3]
25+ [a=1 b=[2 3]]
26+ ~zod/try=> (ream '[a b]=[1 2 3]')
27+ [ %ktts
28+ p=[%2 p=p=%a q=p=%b]
29+ q=[%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
30+ ]
31+
32+ ~zod/try=> [a ~]=[1 2 3]
33+ [a=1 2 3]
34+ ~zod/try=> (ream '[a ~]=[1 2 3]')
35+ [ %ktts
36+ p=[%2 p=p=%a q=[%0 ~]]
37+ q=[%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
38+ ]
39+
40+
docs/system/hoon/library/mold/tone.mdnew file+45
@@ -0,0 +1,45 @@
1+### `++tone`
2+
3+Intermediate Nock computation result
4+
5+Similar to [`++toon`](), but stack trace is not yet rendered.
6+
7+Source
8+------
9+
10+ ++ tone $% [%0 p=*] :: success
11+
12+Examples
13+--------
14+
15+ ~zod/try=> (mink [[20 21] 0 3] ,~)
16+ [%0 p=21]
17+
18+ ~zod/try=> (mink [[0] !=(.^(cy//=main/1))] ,~)
19+ [%1 p=~[[31.075 1.685.027.454 1.852.399.981 49 0]]]
20+ ~zod/try=> (path [31.075 1.685.027.454 1.852.399.981 49 0])
21+ /cy/~zod/main/1
22+
23+ ~zod/try=> (mink [[1 2] !=(~|(%hi +(.)))] ,~)
24+ [%2 p=~[[~.yelp 26.984]]]
25+ ~zod/try=> (mink [[1 2] !=(!:(+(.)))] ,~)
26+ [ %2
27+ p
28+ ~[
29+ [ ~.spot
30+ [ [ 1.685.027.454
31+ 7.959.156
32+ \/159.445.990.350.374.058.574.398.238.344.143.957.205.628.479.572.65\/
33+ 8.112.403.878.526
34+ \/ \/
35+ 0
36+ ]
37+ [1 20]
38+ 1
39+ 24
40+ ]
41+ ]
42+ ]
43+ ]
44+
45+
docs/system/hoon/library/mold/toon.mdnew file+26
@@ -0,0 +1,26 @@
1+### `++toon`
2+
3+Nock computation result
4+
5+Either success (`%0`), a block with list of requests blocked on (`%1`), or
6+failure with stack trace (`%2`).
7+
8+Source
9+------
10+
11+ ++ toon $% [%0 p=*] :: success
12+
13+Examples
14+--------
15+ ~zod/try=> (mock [[20 21] 0 3] ,~)
16+ [%0 p=21]
17+
18+ ~zod/try=> (mock [[0] !=(.^(cy//=main/1))] ,~)
19+ [%1 p=~[[31.075 1.685.027.454 1.852.399.981 49 0]]]
20+ ~zod/try=> (path [31.075 1.685.027.454 1.852.399.981 49 0])
21+ /cy/~zod/main/1
22+
23+ ~zod/try=> (mock [[1 2] !=(!:(+(.)))] ,~)
24+ [%2 p=~[[%leaf p="/~zod/try/~2014.9.23..18.34.32..d3c5/:<[1 20].[1 24]>"]]]
25+
26+
docs/system/hoon/library/mold/tram.mdnew file+24
@@ -0,0 +1,24 @@
1+### `++tram`
2+
3+List of changes
4+
5+List of changes by location in context. When using [`%=`](), for example,
6+the list of changes is a `++tram`.
7+
8+Source
9+------
10+
11+ ++ tram (list ,[p=wing q=twig]) ::
12+
13+Examples
14+--------
15+
16+ ~zod/try=> (ream '$(a 1, b 2)')
17+ [ %cnts
18+ p=~[%$]
19+ q=~[[p=~[%a] q=[%dtzy p=%ud q=1]] [p=~[%b] q=[%dtzy p=%ud q=2]]]
20+ ]
21+ ~zod/try=> (tram +:(ream '$(a 1, b 2)'))
22+ ~[[p=~ q=[% p=0]] [p=~[%a] q=[%dtzy p=%ud q=1]] [p=~[%b] q=[%dtzy p=%ud q=2]]]
23+
24+
docs/system/hoon/library/mold/trap.mdnew file+24
@@ -0,0 +1,24 @@
1+### `++trap`
2+
3+Core with one arm `$`
4+
5+A trap is a core with one arm `++$`. Used when XX
6+
7+Source
8+------
9+
10+ ++ trap ,_|.(_*) :: makes perfect sense
11+
12+Examples
13+--------
14+
15+See also: `|.`
16+
17+ ~zod/try=> *trap
18+ <1.mws 101.jzo 1.ypj %164>
19+ ~zod/try=> (*trap)
20+ 0
21+ ~zod/try=> (|.(42))
22+ 42
23+
24+
docs/system/hoon/library/mold/tree.mdnew file+19
@@ -0,0 +1,19 @@
1+### `++tree`
2+
3+Tree mold generator
4+
5+A `++tree` can be empty, or contain a node of a type and
6+left/right sub `++tree` of the same type. Pretty-printed with `{}`.
7+
8+Source
9+------
10+
11+ ++ tree |* a=_,* :: binary tree
12+
13+Examples
14+--------
15+
16+ ~zod/try=> `(tree ,[@ tape])`[[1 "hi"] [[2 "bye"] ~ ~] ~]
17+ {[2 "bye"] [1 "hi"]}
18+
19+
docs/system/hoon/library/mold/trel.mdnew file+18
@@ -0,0 +1,18 @@
1+### `++trel`
2+
3+Mold of three types
4+
5+[`++mold`]() of the tuple of the three types passed in.
6+
7+Source
8+------
9+
10+ ++ trel |* [a=$+(* *) b=$+(* *) c=$+(* *)] :: just a triple
11+
12+Examples
13+--------
14+
15+ ~zod/try=> *(trel ,@ud ,@t ,@s)
16+ [p=0 q='' r=--0]
17+
18+
docs/system/hoon/library/mold/tuna.mdnew file+25
@@ -0,0 +1,25 @@
1+### `++tuna`
2+
3+XML template tree
4+
5+An XML template tree.
6+
7+Source
8+------
9+
10+ ++ tuna :: tagflow
11+ [%d p=twig] :: dynamic list
12+ [%e p=twig q=(list tuna)] :: element
13+ [%f p=(list tuna)] :: subflow
14+ == ::
15+
16+Examples
17+--------
18+
19+Leaf %a contains plain-text, %b an empty tag, %c a static list, %d a
20+dynamic list, %e a full node element containing a twig and a list of
21+tuna, and %f is a empty node.
22+
23+See also: [`++sail`]()
24+
25+
docs/system/hoon/library/mold/tune.mdnew file+13
@@ -0,0 +1,13 @@
1+### `++tune`
2+
3+
4+Source
5+------
6+
7+ ++ tune $% [%0 p=vase] ::
8+
9+Examples
10+--------
11+Probably typed `tone`?
12+
13+
docs/system/hoon/library/mold/tusk.mdnew file+21
@@ -0,0 +1,21 @@
1+### `++tusk`
2+
3+List of expressions
4+
5+List of [`++twig`]()s. In [`:*`](), for example, your contents is
6+a `++tusk`.
7+
8+Source
9+------
10+
11+ ++ tusk (list twig) ::
12+
13+Examples
14+--------
15+
16+ ~zod/try=> (ream '[1 2 3]')
17+ [%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
18+ ~zod/try=> (tusk +:(ream '[1 2 3]'))
19+ ~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]
20+
21+
docs/system/hoon/library/mold/twig.mdnew file+9
@@ -0,0 +1,9 @@
1+### `++twig`
2+
3+Expression
4+
5+An expression, or AST.
6+
7+See Twig section of Hoon reference
8+
9+
docs/system/hoon/library/mold/twin.mdnew file+25
@@ -0,0 +1,25 @@
1+### `++twin`
2+
3+Aliasing
4+
5+Used in `%bull` within [`++type`]() to typecheck aliased faces.
6+
7+Source
8+------
9+
10+ ++ twin ,[p=term q=wing r=axis s=type] :: alias info
11+
12+Examples
13+--------
14+
15+ ~zod/try=> (~(busk ut %cell %noun [%atom %ud]) %fal [%& 3]~)
16+ [ %bull
17+ p=[p=%fal q=~[[%.y p=3]] r=3 s=[%atom p=%ud]]
18+ q=[%cell p=%noun q=[%atom p=%ud]]
19+ ]
20+ ~zod/try=> &2:(~(busk ut %cell %noun [%atom %ud]) %fal [%& 3]~)
21+ p=[p=%fal q=~[[%.y p=3]] r=3 s=[%atom p=%ud]]
22+ ~zod/try=> (twin &2:(~(busk ut %cell %noun [%atom %ud]) %fal [%& 3]~))
23+ [p=%fal q=~[[%.y p=3]] r=3 s=[%atom p=%ud]]
24+
25+
docs/system/hoon/library/mold/tyke.mdnew file+23
@@ -0,0 +1,23 @@
1+### `++tyke`
2+
3+List of 'maybe' twigs
4+
5+List of [`++unit`]() [`++twig`](), or gaps left to be inferred, in [`++path`]()
6+parsing. When you use a path such as `/=main=/pub/src/doc` the path is in fact
7+a `++tyke`, where the `=` are inferred from your current path.
8+
9+
10+Source
11+------
12+
13+ ++ tyke (list (unit twig)) ::
14+
15+Examples
16+--------
17+
18+ ~zod/try=> (scan "/==as=" porc:vast)
19+ [0 ~[~ ~ [~ [%dtzy p=%tas q=29.537]] ~]]
20+ ~zod/try=> `tyke`+:(scan "/==as=" porc:vast)
21+ ~[~ ~ [~ [%dtzy p=%tas q=29.537]] ~]
22+
23+
docs/system/hoon/library/mold/type.mdnew file+6
@@ -0,0 +1,6 @@
1+
2+### `++type`
3+
4+See Type section of Hoon reference
5+
6+
docs/system/hoon/library/mold/typo.mdnew file+18
@@ -0,0 +1,18 @@
1+### `++typo`
2+
3+Pointer for `++type`
4+
5+Pointer for [`++type`](). `++typo` preserves the previous `++type` in your
6+context when upating.
7+
8+Source
9+------
10+
11+ ++ typo type :: old type
12+
13+Examples
14+--------
15+
16+See also: `++seem`, `++vise`, `++type`
17+
18+
docs/system/hoon/library/mold/tyre.mdnew file+12
@@ -0,0 +1,12 @@
1+### `++tyre`
2+
3+List, term to twig
4+
5+Associative list of [++term]() [`++twig`](), used in [jet]() hint processing.
6+
7+Source
8+------
9+
10+ ++ tyre (list ,[p=term q=twig]) ::
11+
12+
docs/system/hoon/library/mold/udal.mdnew file+10
@@ -0,0 +1,10 @@
1+### `++udal`
2+
3+Source
4+------
5+
6+ ++ udal :: atomic change (%b)
7+
8+Examples
9+--------
10+
docs/system/hoon/library/mold/udon.mdnew file+15
@@ -0,0 +1,15 @@
1+### `++udon`
2+
3+ ++ udon :: abstract delta
4+ $: p=umph :: preprocessor
5+ $= q :: patch
6+ $% [%a p=* q=*] :: trivial replace
7+ [%b p=udal] :: atomic indel
8+ [%c p=(urge)] :: list indel
9+ [%d p=upas q=upas] :: tree edit
10+ == ::
11+ == ::
12+
13+See `%clay` doc
14+
15+
docs/system/hoon/library/mold/umph.mdnew file+13
@@ -0,0 +1,13 @@
1+### `++umph`
2+
3+ ++ umph :: change filter
4+ $| $? %a :: no filter
5+ %b :: jamfile
6+ %c :: LF text
7+ == ::
8+ $% [%d p=@ud] :: blocklist
9+ == ::
10+
11+See `%clay` doc
12+
13+
docs/system/hoon/library/mold/unce.mdnew file+8
@@ -0,0 +1,8 @@
1+### `++unce`
2+
3+ ++ unce |* a=_,* :: change part
4+ $% [%& p=@ud] :: skip[copy]
5+ [%| p=(list a) q=(list a)] :: p -> q[chunk]
6+ == ::
7+
8+See `%clay` doc
docs/system/hoon/library/mold/unit.mdnew file+25
@@ -0,0 +1,25 @@
1+### `++unit`
2+
3+Maybe
4+
5+[mold]() generator. A `++unit` is either `~` or `[~ u=a]` where `a` is the
6+type that was passed in.
7+
8+
9+Source
10+------
11+
12+ ++ unit |* a=_,* :: maybe
13+
14+Examples
15+--------
16+
17+See also: [`++bind`]()
18+
19+ ~zod/try=> :type; *(unit time)
20+ ~
21+ u(@da)
22+ ~zod/try=> `(unit time)`[~ -<-]
23+ [~ ~2014.9.24..19.25.10..7dd5]
24+
25+
docs/system/hoon/library/mold/upas.mdnew file+12
@@ -0,0 +1,12 @@
1+### `++upas`
2+
3+ ++ upas :: tree change (%d)
4+ $& [p=upas q=upas] :: cell
5+ $% [%0 p=axis] :: copy old
6+ [%1 p=*] :: insert new
7+ [%2 p=axis q=udon] :: mutate!
8+ == ::
9+
10+See `%clay` doc
11+
12+
docs/system/hoon/library/mold/urge.mdnew file+7
@@ -0,0 +1,7 @@
1+### `++urge`
2+
3+ ++ urge |*(a=_,* (list (unce a))) :: list change
4+
5+See `%clay` doc
6+
7+
docs/system/hoon/library/mold/vase.mdnew file+19
@@ -0,0 +1,19 @@
1+### `++vase`
2+
3+Typed data. A `++vase` is used wherever typed data is explicitly worked
4+with.
5+
6+
7+Source
8+------
9+
10+ ++ vase ,[p=type q=*] :: type-value pair
11+
12+Examples
13+--------
14+See `%arvo` doc
15+
16+ ~zod/try=> `vase`!>(~)
17+ [p=[%cube p=0 q=[%atom p=%n]] q=0]
18+
19+
docs/system/hoon/library/mold/vise.mdnew file+17
@@ -0,0 +1,17 @@
1+### `++vise`
2+
3+Convert during reboot
4+
5+Used to convert from previously-typed data during reboot.
6+
7+Source
8+------
9+
10+ ++ vise ,[p=typo q=*] :: old vase
11+
12+Examples
13+--------
14+
15+See also: [`++typo`](), [`++seer`]()
16+
17+
docs/system/hoon/library/mold/wain.mdnew file+32
@@ -0,0 +1,32 @@
1+### `++wain`
2+
3+ ++ wain (list cord) :: text lines (no \n)
4+
5+A list of lines. A `++wain` is used instead of a single [`++cord`]() with
6+`\n`.
7+
8+See also: [`++lore`](), [`++role`]()
9+
10+ ~zod/try=> `wain`/som/del/rok
11+ <|som del rok|>
12+ ~zod/try=> `wain`(lore ^:@t/=main=/bin/tree/hoon)
13+ <|
14+ !:
15+ :: /===/bin/tree/hoon
16+ |= ^
17+ |= [pax=path fla=$|(~ [%full ~])]
18+ =- ~[te/-]~
19+ =+ len=(lent pax)
20+ =+ rend=?~(fla |=(a=path +:(spud (slag len a))) spud)
21+ |- ^- wain
22+ =+ ark=;;(arch .^(cy/pax))
23+ =- ?~ q.ark -
24+ [(crip (rend pax)) -]
25+ %- zing
26+ %- turn :_ |=(a=@t ^$(pax (weld pax `path`/[a])))
27+ %- sort :_ aor
28+ %- turn :_ |=([a=@t ~] a)
29+ (~(tap by r.ark))
30+ |>
31+
32+
docs/system/hoon/library/mold/wall.mdnew file+31
@@ -0,0 +1,31 @@
1+### `++wall`
2+
3+List of lines
4+
5+
6+A `++wall` is used instead of a single [`++tape`]() with
7+`\n`.
8+
9+Source
10+------
11+
12+ ++ wall (list tape) :: text lines (no \n)
13+
14+Examples
15+--------
16+
17+See also: [`++wash`]()
18+
19+ ~zod/try=> `wall`(wash [0 20] leaf/<(bex 256)>)
20+ <<
21+ "\/115.792.089.237.\/"
22+ " 316.195.423.570."
23+ " 985.008.687.907."
24+ " 853.269.984.665."
25+ " 640.564.039.457."
26+ " 584.007.913.129."
27+ " 639.936"
28+ "\/ \/"
29+ >>
30+
31+
docs/system/hoon/library/mold/wine.mdnew file+86
@@ -0,0 +1,86 @@
1+### `++wine`
2+
3+Printable type
4+
5+Used for pretty printing.
6+
7+Source
8+------
9+
10+ ++ wine $| ?(%noun %path %tank %void %wall %wool %yarn)
11+ [%list p=term q=wine] ::
12+ [%pear p=term q=@] ::
13+ [%pick p=(list wine)] ::
14+ [%plot p=(list wine)] ::
15+ [%stop p=@ud] ::
16+ [%tree p=term q=wine] ::
17+ [%unit p=term q=wine] ::
18+ == ::
19+
20+Examples
21+--------
22+
23+See also: [`++calf`]()
24+
25+ ~zod/try=> ~(dole ut p:!>(*@tas))
26+ [p={} q=[%atom p=%tas]]
27+ ~zod/try=> `wine`q:~(dole ut p:!>(*@tas))
28+ [%atom p=%tas]
29+
30+ ~zod/try=> ~(dole ut p:!>(*path))
31+ [ p
32+ { [ p=1
33+ q
34+ [ %pick
35+ p
36+ ~[
37+ [%pear p=%n q=0]
38+ [%plot p=~[[%face p=%i q=[%atom p=%ta]] [%face p=%t q=[%stop p=1]]]]
39+ ]
40+ ]
41+ ]
42+ }
43+ q=%path
44+ ]
45+ ~zod/try=> `wine`q:~(dole ut p:!>(*path))
46+ %path
47+
48+ ~zod/try=> ~(dole ut p:!>(*(map time cord)))
49+ [ p
50+ { [ p=1
51+ q
52+ [ %pick
53+ p
54+ ~[
55+ [%pear p=%n q=0]
56+ [ %plot
57+ p
58+ ~[
59+ [ %face
60+ p=%n
61+ q
62+ [ %plot
63+ p=~[[%face p=%p q=[%atom p=%da]] [%face p=%q q=[%atom p=%t]]]
64+ ]
65+ ]
66+ [%face p=%l q=[%stop p=1]]
67+ [%face p=%r q=[%stop p=1]]
68+ ]
69+ ]
70+ ]
71+ ]
72+ ]
73+ }
74+ q
75+ [ %tree
76+ p=%nlr
77+ q=[%plot p=~[[%face p=%p q=[%atom p=%da]] [%face p=%q q=[%atom p=%t]]]]
78+ ]
79+ ]
80+ ~zod/try=> `wine`q:~(dole ut p:!>(*(map time cord)))
81+ [ %tree
82+ p=%nlr
83+ q=[%plot p=~[[%face p=%p q=[%atom p=%da]] [%face p=%q q=[%atom p=%t]]]]
84+ ]
85+
86+
docs/system/hoon/library/mold/wing.mdnew file+15
@@ -0,0 +1,15 @@
1+### `++wing`
2+
3+ ++ wing (list limb) ::
4+
5+Address in subject. A `++wing` is a path to a value in the subject. A
6+term alone is the trivial case of a `++wing`.
7+
8+See also: `++twig`
9+
10+ ~zod/try=> (ream 'a.+.c')
11+ [%cnzz p=~[%a [%.y p=3] %c]]
12+ ~zod/try=> (wing +:(ream 'a.+.c'))
13+ ~[%a [%.y p=3] %c]
14+
15+
docs/system/hoon/library/mold/wonk.mdnew file+29
@@ -0,0 +1,29 @@
1+### `++wonk`
2+
3+XX Not a model?
4+
5+Pull result out of a `++edge`, or crash if there's no result.
6+
7+Source
8+------
9+
10+ ++ wonk |*(veq=edge ?~(q.veq !! p.u.q.veq)) ::
11+
12+Examples
13+--------
14+
15+See also: [`++edge`]()
16+
17+ ~zod/try=> (wide:vast [1 1] "(add 2 2)")
18+ [ p=[p=1 q=10]
19+ q
20+ [ ~
21+ [ p=[%cnhp p=[%cnzz p=~[%add]] q=~[[%dtzy p=%ud q=2] [%dtzy p=%ud q=2]]]
22+ q=[p=[p=1 q=10] q=""]
23+ ]
24+ ]
25+ ]
26+ ~zod/try=> (wonk (wide:vast [1 1] "(add 2 2)"))
27+ [%cnhp p=[%cnzz p=~[%add]] q=~[[%dtzy p=%ud q=2] [%dtzy p=%ud q=2]]]
28+
29+