on master help sign in
Merge pull request #1156 from tinnus-napbus/update-stdlib-2j-to-2n

Update stdlib 2j to 2n

commit4e2f0539a20a2e761741a6407ce5e1babec84a08 authortinnus-napbus <77721746+tinnus-napbus@users.noreply.github.com> dateSat 25 Sep 2021, 20:02 (5 years ago) parent97d154cf7edb12
7 files changed+785−478
content/docs/hoon/reference/stdlib/2j.md+263−155 content/docs/hoon/reference/stdlib/2k.md+191−135 content/docs/hoon/reference/stdlib/2m.md+40−32 content/docs/hoon/reference/stdlib/2n.md+144−130 content/docs/hoon/reference/stdlib/5c.md+77−1 content/docs/hoon/reference/stdlib/table-of-contents.md+19−9 lib/glossary.js+51−16
content/docs/hoon/reference/stdlib/2j.md+263−155
@@ -4,25 +4,45 @@ weight = 13
44template = "doc.html"
55+++
66
7−### `++ja`
7+## `++ja`
88
99Jar engine
1010
11−```hoon
12− |_ a=(jar)
13−```
11+A container arm for `jar` operation arms. A `jar` is a `map` of
12+`list`s. The contained arms inherit the sample jar.
1413
15−A container arm for `++jar` operation arms. A `++jar` is a `++map` of
16−`++list`s. The contained arms inherit the sample jar.
14+#### Accepts
1715
1816`a` is a jar.
1917
18+#### Produces
19+
20+A core.
21+
22+#### Source
23+
24+```hoon
25+++ ja
26+ =| a=(tree (pair * (list))) :: (jar)
27+ |@
28+```
29+
30+#### Examples
31+
2032```
2133> ~(. ja (my [a+1 b+2 ~]))
2234< 2.ngd
23− [ a=?(%~ [n=[?(p=%a p=%b) q=@ud] l=nlr([p=?(%a %b) q=@ud]) r=nlr([p=?(%a %b) q=@ud])])
24− <123.zao 45.xig 1.pnw %140>
35+ [ a
36+ ?(
37+ %~
38+ [ n=[?(p=%a p=%b) q=@ud]
39+ l=nlr([p=?(%a %b) q=@ud])
40+ r=nlr([p=?(%a %b) q=@ud])
41+ ]
42+ )
43+ <123.zao 46.hgz 1.pnw %140>
2544 ]
45+>
2646```
2747
2848---
@@ -31,37 +51,41 @@ A container arm for `++jar` operation arms. A `++jar` is a `++map` of
3151
3252Grab value by key
3353
34−```hoon
35− ++ get :: gets list by key
36− |* b=*
37− =+ c=(~(get by a) b)
38− ?~(c ~ u.c)
39−```
54+Produces the list at key `b` in jar `a`.
4055
4156#### Accepts
4257
43−`a` is a `++jar`.
58+`a` is a `jar`, and is the sample of `+ja`.
4459
45−`b` is a key of the same type as the keys in `a`.
60+`b` is a noun.
4661
4762#### Produces
4863
49−A list retrieved from jar `a` using the key `b`.
64+A `list`.
5065
51−Examples
66+#### Source
5267
68+```hoon
69+++ get
70+ |* b=*
71+ =+ c=(~(get by a) b)
72+ ?~(c ~ u.c)
5373```
54−> =l (my [['a' (ly 1 2 3 ~)] ['b' (ly 4 5 6 ~)]~])
55−> l
56−[n=[p='b' q=[i=4 t=~[5 6]]] l={} r={[p='a' q=[i=1 t=~[2 3]]]}]
5774
58−> (~(get ja l) 'a')
59−[i=1 t=[i=2 t=~[3]]]
75+#### Examples
6076
61−> (~(get ja l) 'b')
62−[i=4 t=[i=5 t=~[6]]]
77+```
78+> =j `(jar @t @ud)`(malt ~[['a' `(list @ud)`~[1 2 3]] ['b' `(list @ud)`~[4 5 6]]])
79+> j
80+{[p='b' q=~[4 5 6]] [p='a' q=~[1 2 3]]}
81+
82+> `(list @ud)`(~(get ja j) 'a')
83+~[1 2 3]
6384
64−> (~(get ja l) 'c')
85+> `(list @ud)`(~(get ja j) 'b')
86+~[4 5 6]
87+
88+> `(list @ud)`(~(get ja j) 'c')
6589~
6690```
6791
@@ -71,114 +95,166 @@ Examples
7195
7296Prepend to list
7397
74−#### Source
75−
76−```hoon
77− ++ add :: adds key-list pair
78− |* [b=* c=*]
79− =+ d=(get b)
80− (~(put by a) b [c d])
81−```
98+Adds `c` to the head of the list at key `b` in jar `a`. If `b` does not exist in `a`, a new key-value pair is added with a list containing `c`.
8299
83100#### Accepts
84101
85−`a` is a jar.
102+`a` is a `jar`, and is the sample of `+ja`.
86103
87−`b` is a key of the same type as the keys in `a`.
104+`b` is a noun of the same type as the keys in `a`.
88105
89−`c` is a value of the same type as the values in `a`.
106+`c` is a noun of the same type the lists in `a` contain.
107+
108+#### Produces
109+
110+A `jar`.
111+
112+#### Source
113+
114+```hoon
115+++ add
116+ |* [b=* c=*]
117+ =+ d=(get b)
118+ (~(put by a) b [c d])
119+```
90120
91121#### Examples
92122
93123```
94−> =l (my [['a' (ly 1 2 3 ~)] ['b' (ly 4 5 6 ~)]~])
95−> l
96−[n=[p='b' q=[i=4 t=~[5 6]]] l={} r={[p='a' q=[i=1 t=~[2 3]]]}]
97−> (~(add ja l) 'a' 100)
98−[ n=[p='b' q=[i=4 t=[i=5 t=~[6]]]]
99− l=~
100− r=[n=[p='a' q=[i=100 t=[i=1 t=~[2 3]]]] l=~ r=~]
101−]
102−> (~(add ja l) 'a' 100)
103−[n=[p='b' q=[i=4 t=[i=5 t=~[6]]]] l=~ r=[n=[p='a' q=[i=100 t=[i=1 t=~[2 3]]]] l=~ r=~]]
104−> (~(add ja l) 'b' 7)
105−[n=[p='b' q=[i=7 t=[i=4 t=~[5 6]]]] l=~ r=[n=[p='a' q=[i=1 t=[i=2 t=~[3]]]] l=~ r=~]]
106−> (~(add ja l) 'c' 7)
107−[ n=[p='b' q=[i=4 t=[i=5 t=~[6]]]]
108− l=~
109− r=[n=[p='c' q=[i=7 t=~]] l=[n=[p='a' q=[i=1 t=~[2 3]]] l={} r={}] r=~]
110−]
111−> (~(add ja l) 'c' (ly 7 8 9 ~))
112−mull-grow
113−mull-nice
124+> =j `(jar @t @ud)`(malt ~[['a' `(list @ud)`~[1 2 3]] ['b' `(list @ud)`~[4 5 6]]])
125+> j
126+{[p='b' q=~[4 5 6]] [p='a' q=~[1 2 3]]}
127+
128+> `(jar @t @ud)`(~(add ja j) 'b' 7)
129+{[p='b' q=~[7 4 5 6]] [p='a' q=~[1 2 3]]}
130+
131+> `(jar @t @ud)`(~(add ja j) 'c' 8)
132+{[p='b' q=~[4 5 6]] [p='a' q=~[1 2 3]] [p='c' q=~[8]]}
114133```
115134
116−\*\*
135+---
117136
118−### `++ju`
137+## `++ju`
119138
120139Jug operations
121140
141+Container arm for jug operation arms. A `jug` is a `map` of
142+`set`s. The contained arms inherit its sample jug, `a`.
143+
144+#### Accepts
145+
146+`a` is a `jug`.
147+
148+#### Produces
149+
150+A core.
151+
152+#### Source
153+
122154```hoon
123− ++ ju :: jug engine
124− |/ a=(jug)
155+++ ju
156+ =| a=(tree (pair * (tree))) :: (jug)
157+ |@
125158```
126159
127−Container arm for jug operation arms. A `++jug` is a `++map` of
128−`++sets`. The contained arms inherit its sample jug, `a`.
129−
130−`a` is a jug.
160+#### Example
131161
132162```
133−> ~(. ju (my [[a (sy 1 ~)] [b (sy 2 ~)] ~]))
134−< 5.cws
135− [ a
136− ?(
137− %~
138− [ n=[p=@ub ?(q=%~ q=[?(n=@ud #!) l=nlr(?(@ud #!)) r=nlr(?(@ud #!))])]
139− l=nlr([p=@ub q=?(%~ [?(n=@ud #!) l=nlr(?(@ud #!)) r=nlr(?(@ud #!))])])
140− r=nlr([p=@ub q=?(%~ [?(n=@ud #!) l=nlr(?(@ud #!)) r=nlr(?(@ud #!))])])
141− ]
142− )
143− <123.zao 45.xig 1.pnw %140>
144− ]
163+> =j `(jug @t @ud)`(malt ~[['a' (silt ~[1 2 3])] ['b' (silt ~[4 5 6])]])
164+> j
165+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
166+
167+> ~(. ju j)
168+<5.cws [a=nlr([p=@t q=nlr(@ud)]) <123.zao 46.hgz 1.pnw %140>]>
145169```
146170
171+---
172+
147173### `++del:ju`
148174
149175Remove
150176
177+Produces jug `a` with value `c` removed from set located at key `b`.
178+
179+#### Accepts
180+
181+`a` is a jug, and is the sample of `+ju`.
182+
183+`b` is a noun of the same type as the keys in `a`.
184+
185+`c` is a noun of the same type as the sets in `a` contain.
186+
151187#### Source
152188
153189```hoon
154− ++ del :: del key-set pair
155− |* [b=* c=*]
156− ^+ a
157− =+ d=(get b)
158− =+ e=(~(del in d) c)
159− ?~ e
160− (~(del by a) b)
161− (~(put by a) b e)
190+++ del
191+ |* [b=* c=*]
192+ ^+ a
193+ =+ d=(get b)
194+ =+ e=(~(del in d) c)
195+ ?~ e
196+ (~(del by a) b)
197+ (~(put by a) b e)
162198```
163199
164−Produces jug `a` with value `c` removed from set located at key `b`.
200+#### Examples
165201
166−`a` is a jug.
202+```
203+> j
204+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
167205
168−`b` is a key of the same type as the keys in `a`.
206+> `(jug @t @ud)`(~(del ju j) 'b' 6)
207+{[p='b' q={5 4}] [p='a' q={1 2 3}]}
169208
170−`c` is the value of the same type of the keys in `a` that is to be
171−removed.
209+> `(jug @t @ud)`(~(del ju j) 'b' 10)
210+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
172211
212+> `(jug @t @ud)`(~(del ju j) 'c' 10)
213+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
173214```
174− > s
175− [[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
176215
177− > (~(del ju s) 'a' 1)
178− {[p='a' q={3 2}] [p='b' q={5 4 6}]}
216+---
217+
218+### `++gas:ju`
219+
220+Concatenate
221+
222+Add each of the key-value pairs in list `b` to jug `a`. The values in `b` are the type the sets in `a` contain. For keys in `b` that exist in `a`, the values will be added to their sets. For keys in `b` that don't exist in `a`, new keys and sets will be added.
223+
224+#### Accepts
225+
226+`a` is a `jug`, and is the sample of `+ju`.
179227
180− > (~(del ju s) 'c' 7)
181− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
228+`b` is a `(list [p q])`, where:
229+
230+- `p` is a noun, the type of the keys in `a`.
231+- `q` is a noun, the type the sets in `a` contain.
232+
233+#### Produces
234+
235+A `jug`.
236+
237+#### Source
238+
239+```hoon
240+++ gas
241+ |* b=(list [p=* q=*])
242+ => .(b `(list _?>(?=([[* ^] ^] a) [p=p q=n.q]:n.a))`b)
243+ |- ^+ a
244+ ?~ b
245+ a
246+ $(b t.b, a (put p.i.b q.i.b))
247+```
248+
249+#### Examples
250+
251+```
252+> =j `(jug @t @ud)`(malt ~[['a' (silt ~[1 2 3])] ['b' (silt ~[4 5 6])]])
253+> j
254+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
255+
256+> `(jug @t @ud)`(~(gas ju j) ~[['a' 10] ['a' 42] ['b' 999] ['c' 7]])
257+{[p='b' q={5 6 4 999}] [p='a' q={10 42 1 2 3}] [p='c' q={7}]}
182258```
183259
184260---
@@ -187,28 +263,42 @@ removed.
187263
188264Retrieve set
189265
266+Produces a set retrieved from jar `a` using key `b`.
267+
268+#### Accepts
269+
270+`a` is a jar, and the sample of `+ju`.
271+
272+`b` is key, a noun of the same type as the keys in `a`.
273+
274+#### Produces
275+
276+A `set`.
277+
278+#### Source
279+
190280```hoon
191− ++ get :: gets set by key
192− |* b=*
193− =+ c=(~(get by a) b)
194− ?~(c ~ u.c)
281+++ get
282+ |* b=*
283+ =+ c=(~(get by a) b)
284+ ?~(c ~ u.c)
195285```
196286
197−Produces a set retrieved from jar `a` using key `b`.
287+#### Examples
198288
199−`a` is a jar.
289+```
290+> =j `(jug @t @ud)`(malt ~[['a' (silt ~[1 2 3])] ['b' (silt ~[4 5 6])]])
291+> j
292+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
200293
201−`b` is a key of the same type as the keys in `a`.
294+> `(set @ud)`(~(get ju j) 'a')
295+{1 2 3}
202296
203−```
204− > s
205− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
206− > (~(get ju s) 'a')
207− {1 3 2}
208− > (~(get ju s) 'b')
209− {5 4 6}
210− > (~(get ju s) 'c')
211− ~
297+> `(set @ud)`(~(get ju j) 'b')
298+{5 6 4}
299+
300+> `(set @ud)`(~(get ju j) 'c')
301+{}
212302```
213303
214304---
@@ -217,37 +307,45 @@ Produces a set retrieved from jar `a` using key `b`.
217307
218308Check contents
219309
310+Computes whether a value `c` exists within the set located at key `b`
311+with jug `a`, producing a flag.
312+
313+#### Accepts
314+
315+`a` is a `jug`, and the sample of `+ju`.
316+
317+`b` is a noun of the same type as the keys in `a`.
318+
319+`c` is a noun of the same type as the sets in `a` contain.
320+
321+#### Produces
322+
323+A `?`.
324+
325+#### Source
326+
220327```hoon
221− ++ has :: existence check
222− |* [b=* c=*]
223− ^- ?
224− (~(has in (get b)) c)
328+++ has
329+ |* [b=* c=*]
330+ ^- ?
331+ (~(has in (get b)) c)
225332```
226333
227−Computes whether a value `c` exists within the set located at key `b`
228−with jar `a`. Produces a loobean.
334+#### Examples
229335
230−`a` is a set.
336+```
337+> =j `(jug @t @ud)`(malt ~[['a' (silt ~[1 2 3])] ['b' (silt ~[4 5 6])]])
338+> j
339+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
231340
232−`b` is a key as a noun.
341+> (~(has ju j) 'b' 5)
342+%.y
233343
234−`c` is a value as a noun.
344+> (~(has ju j) 'b' 10)
345+%.n
235346
236−```
237− > s
238− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
239− > (~(has ju s) 'a' 3)
240− %.y
241− > (~(has ju s) 'b' 6)
242− %.y
243− > (~(has ju s) 'a' 7)
244− %.n
245− > (~(has jus s) 'c' 7)
246− ! -find-limb.jus
247− ! find-none
248− ! exit
249− > (~(has ju s) 'c' 7)
250− %.n
347+> (~(has ju j) 'c' 10)
348+%.n
251349```
252350
253351---
@@ -256,34 +354,44 @@ with jar `a`. Produces a loobean.
256354
257355Add key-set pair
258356
259−```hoon
260− ++ put :: add key-set pair
261− |* [b=* c=*]
262− ^+ a
263− =+ d=(get b)
264− (~(put by a) b (~(put in d) c))
265−```
357+Produces jug `a` with `c` added to the set located at key `b`. If `b` isn't a key in `a`, it will be added and a new set created containing `c`.
358+
359+#### Accepts
266360
267−Produces jar `a` with `c` added to the set value located at key `b`.
361+`a` is a `jug`.
268362
269−`a` is a set.
363+`b` is a noun, the type of the keys in `a`.
270364
271−`b` is a key as a noun.
365+`c` is a noun, the type the sets in `a` contain.
272366
273−`c` is a value.
367+#### Produces
368+
369+A `jug`.
370+
371+#### Source
372+
373+```hoon
374+++ put
375+ |* [b=* c=*]
376+ ^+ a
377+ =+ d=(get b)
378+ (~(put by a) b (~(put in d) c))
379+```
380+
381+#### Examples
274382
275383```
276− > s
277− [p='a' q=[1 3 2]] [p='b' q=[5 4 6]]]
384+> j
385+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
278386
279− > (~(put ju s) 'a' 7)
280− {[p='a' q={7 1 3 2}] [p='b' q={5 4 6}]}
387+> `(jug @t @ud)`(~(put ju j) 'c' 5)
388+{[p='b' q={5 6 4}] [p='a' q={1 2 3}] [p='c' q={5}]}
281389
282− > (~(put ju s) 'a' 1)
283− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
390+> `(jug @t @ud)`(~(put ju j) 'a' 4)
391+{[p='b' q={5 6 4}] [p='a' q={1 2 3 4}]}
284392
285− > (~(put ju s) 'c' 7)
286− {[p='a' q={1 3 2}] [p='c' q={7}] [p='b' q={5 4 6}]}
393+> `(jug @t @ud)`(~(put ju j) 'a' 1)
394+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
287395```
288396
289397---
content/docs/hoon/reference/stdlib/2k.md+191−135
@@ -4,8 +4,7 @@ weight = 14
44template = "doc.html"
55+++
66
7−### `++to`
8−
7+## `++to`
98
109Queue operations
1110
@@ -19,8 +18,9 @@ sample queue.
1918#### Source
2019
2120```hoon
22− ++ to
23− |_ a=(tree)
21+++ to
22+ =| a=(tree) :: (qeu)
23+ |@
2424```
2525
2626#### Discussion
@@ -31,50 +31,99 @@ interfaces. `to` is the interface core for `qeu`; it's not generic across all
3131the different containers that use `tree`.
3232
3333---
34−### `++bal:to`
3534
36−Balance
35+### `+apt:to`
3736
38−Vertically rebalances queue `a`.
37+Check correctness
38+
39+Test whether queue `a` is correctly ordered, producing a flag.
3940
4041#### Accepts
4142
42−`a` is a queue.
43+`a` is a `que`.
4344
4445#### Produces
4546
46−A queue.
47+A `?`.
4748
4849#### Source
4950
5051```hoon
51− ++ bal
52− |- ^+ a
53− ?~ a ~
54− ?. |(?=(~ l.a) (mor n.a n.l.a))
55− $(a l.a(r $(a a(l r.l.a))))
56− ?. |(?=(~ r.a) (mor n.a n.r.a))
57− $(a r.a(l $(a a(r l.r.a))))
58− a
52+++ apt
53+ |- ^- ?
54+ ?~ a &
55+ ?& ?~(l.a & ?&((mor n.a n.l.a) $(a l.a)))
56+ ?~(r.a & ?&((mor n.a n.r.a) $(a r.a)))
57+ ==
5958```
6059
6160#### Examples
6261
6362```
64− > `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
65− {"a" "b" "c" "d" "e" "f" "g"}
63+> =bad `(qeu @ud)`[1 ~ 2 ~ 3 ~ ~]
64+
65+> ~(apt to bad)
66+%.n
67+```
68+
69+```
70+> =good `(qeu @ud)`(~(gas to `(qeu @ud)`~) ~[1 2 3])
71+
72+> ~(apt to good)
73+%.y
74+```
75+
76+---
77+
78+### `++bal:to`
79+
80+Balance
81+
82+Vertically rebalances queue `a`.
83+
84+#### Accepts
6685
67− > `*`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
68− [[97 0] 0 [98 0] 0 [99 0] 0 [100 0] 0 [101 0] 0 [102 0] 0 [103 0] 0 0]
86+`a` is a `qeu`.
6987
70− > ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
71− [n=[i='d' t=""] l={"a" "b" "c"} r={"e" "f" "g"}]
88+#### Produces
89+
90+A `qeu`.
91+
92+#### Source
93+
94+```hoon
95+++ bal
96+ |- ^+ a
97+ ?~ a ~
98+ ?. |(?=(~ l.a) (mor n.a n.l.a))
99+ $(a l.a(r $(a a(l r.l.a))))
100+ ?. |(?=(~ r.a) (mor n.a n.r.a))
101+ $(a r.a(l $(a a(r l.r.a))))
102+ a
103+```
104+
105+#### Examples
72106
73− > `*`~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
74− [[100 0] [[99 0] [[98 0] [[97 0] 0 0] 0] 0] [101 0] 0 [102 0] 0 [103 0] 0 0]
107+```
108+> =a `(qeu @ud)`[1 ~ 2 ~ 3 ~ ~]
109+> a
110+{1 2 3}
111+> `*`a
112+[1 0 2 0 3 0 0]
113+> ~(apt to a)
114+%.n
115+
116+> =z `(qeu @ud)`~(bal to a)
117+> z
118+{1 2 3}
119+> `*`z
120+[2 [1 0 0] 3 0 0]
121+> ~(apt to z)
122+%.y
75123```
76124
77125---
126+
78127### `++dep:to`
79128
80129Maximum Depth
@@ -92,35 +141,36 @@ An atom.
92141#### Source
93142
94143```hoon
95− ++ dep :: max depth of queue
96− |- ^- @
97− ?~ a 0
98− +((max $(a l.a) $(a r.a)))
144+++ dep
145+ |- ^- @
146+ ?~ a 0
147+ +((max $(a l.a) $(a r.a)))
99148```
100149
101150#### Examples
102151
103152```
104− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 7 ~])
105− > ~(dep to a)
106− 4
153+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 7 ~])
154+> ~(dep to a)
155+4
107156
108− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 ~])
109− > ~(dep to a)
110− 3
157+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 ~])
158+> ~(dep to a)
159+3
111160
112− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 ~])
113− > ~(dep to a)
114− 2
161+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 ~])
162+> ~(dep to a)
163+2
115164
116− > ~(dep to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
117− 7
165+> ~(dep to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
166+7
118167
119− > ~(dep to ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]))
120− 4
168+> ~(dep to ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]))
169+4
121170```
122171
123172---
173+
124174### `++gas:to`
125175
126176Push list
@@ -129,7 +179,7 @@ Push all elements of list `b` into the queue `a`.
129179
130180#### Accepts
131181
132−`a` is a queue.
182+`a` is a queue, and is the sample of `+to`.
133183
134184`b` is a list.
135185
@@ -140,25 +190,26 @@ A queue.
140190#### Source
141191
142192```hoon
143− ++ gas :: insert list to que
144− |= b=(list _?>(?=(^ a) n.a))
145− |- ^+ a
146− ?~(b a $(b t.b, a (put i.b)))
193+++ gas
194+ |= b=(list _?>(?=(^ a) n.a))
195+ |- ^+ a
196+ ?~(b a $(b t.b, a (put i.b)))
147197```
148198
149−
150199#### Examples
151200
152201```
153− > `(qeu)`(~(gas to `(qeu @)`~) [1 2 3 ~])
154− {3 2 1}
202+> `(qeu)`(~(gas to `(qeu @)`~) [1 2 3 ~])
203+{3 2 1}
155204
156− > =a (~(gas to `(qeu @)`~) [1 2 3 ~])
157− > =b [4 5 6 ~]
158− > `(qeu)`(~(gas to a) b)
159− {6 5 4 3 2 1}
205+> =a (~(gas to `(qeu @)`~) [1 2 3 ~])
206+> =b [4 5 6 ~]
207+> `(qeu)`(~(gas to a) b)
208+{6 5 4 3 2 1}
160209```
210+
161211---
212+
162213### `++get:to`
163214
164215Head-tail pair
@@ -176,31 +227,32 @@ A cell of the last element in `a` along with the rest of queue `a`.
176227#### Source
177228
178229```hoon
179− ++ get :: head-rest pair
180− |- ^+ ?>(?=(^ a) [p=n.a q=*(tree _n.a)])
181− ?~ a
182− !!
183− ?~ r.a
184− [n.a l.a]
185− =+ b=$(a r.a)
186− :- p.b
187− ?: |(?=(~ q.b) (mor n.a n.q.b))
188− a(r q.b)
189− a(n n.q.b, l a(r l.q.b), r r.q.b)
230+++ get
231+ |- ^+ ?>(?=(^ a) [p=n.a q=*(tree _n.a)])
232+ ?~ a
233+ !!
234+ ?~ r.a
235+ [n.a l.a]
236+ =+ b=$(a r.a)
237+ :- p.b
238+ ?: |(?=(~ q.b) (mor n.a n.q.b))
239+ a(r q.b)
240+ a(n n.q.b, l a(r l.q.b), r r.q.b)
190241```
191242
192243#### Examples
193244
194245```
195− > =s (~(gas to *(tree @)) `(list @)`~[1 2 3])
196− > ~(get to s)
197− [n=2 l={3} r={1}]
246+> =s (~(gas to *(tree @)) `(list @)`~[1 2 3])
247+> ~(get to s)
248+[n=2 l={3} r={1}]
198249
199− > ~(get to ~)
200− ! exit
250+> ~(get to ~)
251+! exit
201252```
202253
203254---
255+
204256### `++nap:to`
205257
206258Remove head
@@ -218,39 +270,40 @@ A queue.
218270#### Source
219271
220272```hoon
221− ++ nap :: removes root
222− ?> ?=(^ a)
223− ?: =(~ l.a) r.a
224− =+ b=get(a l.a)
225− bal(n.a p.b, l.a q.b)
273+++ nap
274+ ?> ?=(^ a)
275+ ?: =(~ l.a) r.a
276+ =+ b=get(a l.a)
277+ bal(n.a p.b, l.a q.b)
226278```
227279
228280#### Examples
229281
230282```
231− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
232− > -.a
233− n=6
283+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
284+> -.a
285+n=6
234286
235− > =b ~(nap to a)
236− > -.b
237− n=2
287+> =b ~(nap to a)
288+> -.b
289+n=2
238290
239− > a
240− [n=6 l={} r={5 4 3 2 1}]
291+> a
292+[n=6 l={} r={5 4 3 2 1}]
241293
242− > b
243− [n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
294+> b
295+[n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
244296
245− > `(qeu)`b
246− {5 4 3 2 1}
297+> `(qeu)`b
298+{5 4 3 2 1}
247299
248− > `(qeu)`a
249− {6 5 4 3 2 1}
300+> `(qeu)`a
301+{6 5 4 3 2 1}
250302```
251303
252304---
253−### `++nip:to`
305+
306+### `++nip:to`
254307
255308Removes the root of queue `a`, producing the resulting queue.
256309
@@ -265,40 +318,41 @@ A queue.
265318#### Source
266319
267320```hoon
268− ++ nip :: removes root
269− |- ^+ a
270− ?~ a ~
271− ?~ l.a r.a
272− ?~ r.a l.a
273− ?: (mor n.l.a n.r.a)
274− l.a(r $(l.a r.l.a))
275− r.a(l $(r.a l.r.a))
321+++ nip
322+ |- ^+ a
323+ ?~ a ~
324+ ?~ l.a r.a
325+ ?~ r.a l.a
326+ ?: (mor n.l.a n.r.a)
327+ l.a(r $(l.a r.l.a))
328+ r.a(l $(r.a l.r.a))
276329```
277330
278331#### Examples
279332
280333```
281− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
282− > a
283− [n=6 l={} r={5 4 3 2 1}]
334+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
335+> a
336+[n=6 l={} r={5 4 3 2 1}]
284337
285− > ~(nip to a)
286− [n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
338+> ~(nip to a)
339+[n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
287340```
288341
289342---
343+
290344### `++put:to`
291345
292346Insert
293347
294−Accept any noun `b` and adds to queue `a` as the head, producing the
348+Accept noun `b` and adds to queue `a` as the head, producing the
295349resulting queue.
296350
297351#### Accepts
298352
299−`a` is a queue.
353+`a` is a queue, and is the sample of `+to`.
300354
301−`b` is any noun.
355+`b` is a noun.
302356
303357#### Produces
304358
@@ -307,23 +361,24 @@ A queue.
307361#### Source
308362
309363```hoon
310− ++ put :: insert new tail
311− |* b=*
312− |- ^+ a
313− ?~ a
314− [b ~ ~]
315− bal(l.a $(a l.a))
364+++ put
365+ |* b=*
366+ |- ^+ a
367+ ?~ a
368+ [b ~ ~]
369+ bal(l.a $(a l.a))
316370```
317371
318372#### Examples
319373
320374```
321− > =a (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
322− > `(qeu)`(~(put to a) 7)
323− {7 6 5 4 2 1 3}
375+> =a (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
376+> `(qeu)`(~(put to a) 7)
377+{7 6 5 4 2 1 3}
324378```
325379
326380---
381+
327382### `++tap:to`
328383
329384Queue to list
@@ -341,26 +396,28 @@ A list.
341396#### Source
342397
343398```hoon
344− ++ tap :: adds list to end
345− =+ b=`(list _?>(?=(^ a) n.a))`~
346− |- ^+ b
347− =+ 0 :: hack for jet match
348− ?~ a
349− b
350− $(a r.a, b [n.a $(a l.a)])
399+++ tap
400+ =+ b=`(list _?>(?=(^ a) n.a))`~
401+ |- ^+ b
402+ =+ 0 :: hack for jet match
403+ ?~ a
404+ b
405+ $(a r.a, b [n.a $(a l.a)])
351406```
352407
353408#### Examples
354409
355410```
356− > =a (~(gas to `(qeu @)`~) [3 1 2 4 5 6 ~])
357− > `*`a
358− [6 0 2 [4 [5 0 0] 0] 1 0 3 0 0]
359− > ~(tap to a)
360− ~[3 1 2 4 5 6]
411+> =a (~(gas to `(qeu @)`~) [3 1 2 4 5 6 ~])
412+> `*`a
413+[6 0 2 [4 [5 0 0] 0] 1 0 3 0 0]
414+
415+> ~(tap to a)
416+~[3 1 2 4 5 6]
361417```
362418
363419---
420+
364421### `++top:to`
365422
366423Produce head
@@ -378,19 +435,18 @@ A unit.
378435#### Source
379436
380437```hoon
381− ++ top :: produces head
382− |- ^- (unit _?>(?=(^ a) n.a))
383− ?~ a ~
384− ?~(r.a [~ n.a] $(a r.a))
385− --
438+++ top
439+ |- ^- (unit _?>(?=(^ a) n.a))
440+ ?~ a ~
441+ ?~(r.a [~ n.a] $(a r.a))
386442```
387443
388444#### Examples
389445
390446```
391− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
392− > ~(top to a)
393− [~ u=1]
447+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
448+> ~(top to a)
449+[~ u=1]
394450```
395451
396452#### Discussion
content/docs/hoon/reference/stdlib/2m.md+40−32
@@ -4,7 +4,7 @@ weight = 16
44template = "doc.html"
55+++
66
7−### `++ly`
7+## `++ly`
88
99List from raw noun
1010
@@ -40,7 +40,8 @@ A `list`.
4040`ly` is an alias for `le:nl`.
4141
4242---
43−### `++my`
43+
44+## `++my`
4445
4546Map from raw noun
4647
@@ -73,7 +74,8 @@ A `map`.
7374`my` is an alias for `my:nl`.
7475
7576---
76−### `++sy`
77+
78+## `++sy`
7779
7880Set from raw noun
7981
@@ -112,7 +114,8 @@ A `set`.
112114`sy` is an alias for `si:nl`.
113115
114116---
115−### `++nl`
117+
118+## `++nl`
116119
117120Noun-to-container operations
118121
@@ -127,6 +130,7 @@ nouns.
127130```
128131
129132---
133+
130134### `++le:nl`
131135
132136Construct list
@@ -144,12 +148,12 @@ A list.
144148#### Source
145149
146150```hoon
147− ++ le :: construct list
148− |* a=(list)
149− ^+ =< $
150− |@ ++ $ ?:(*? ~ [i=(snag 0 a) t=$])
151− --
152− a
151+++ le
152+ |* a=(list)
153+ ^+ =< $
154+ |@ ++ $ ?:(*? ~ [i=(snag 0 a) t=$])
155+ --
156+ a
153157```
154158
155159#### Examples
@@ -163,6 +167,7 @@ A list.
163167```
164168
165169---
170+
166171### `++my:nl`
167172
168173Construct map
@@ -181,10 +186,10 @@ A map.
181186#### Source
182187
183188```hoon
184− ++ my
185− |* a=(list (pair))
186− => .(a ^+((le a) a))
187− (~(gas by `(map _p.i.-.a _q.i.-.a)`~) a)
189+++ my
190+ |* a=(list (pair))
191+ => .(a ^+((le a) a))
192+ (~(gas by `(map _p.i.-.a _q.i.-.a)`~) a)
188193```
189194
190195#### Examples
@@ -195,6 +200,7 @@ A map.
195200```
196201
197202---
203+
198204### `++si:nl`
199205
200206Construct set
@@ -212,10 +218,10 @@ A set.
212218#### Source
213219
214220```hoon
215− ++ si
216− |* a=(list)
217− => .(a ^+((le a) a))
218− (~(gas in `(set _i.-.a)`~) a)
221+++ si
222+ |* a=(list)
223+ => .(a ^+((le a) a))
224+ (~(gas in `(set _i.-.a)`~) a)
219225```
220226
221227#### Examples
@@ -226,6 +232,7 @@ A set.
226232```
227233
228234---
235+
229236### `++snag:nl`
230237
231238Index
@@ -246,13 +253,13 @@ A noun.
246253#### Sources
247254
248255```hoon
249− ++ snag
250− |* [a=@ b=(list)]
251− ?~ b
252− ~_ leaf+"snag-fail"
253− !!
254− ?: =(0 a) i.b
255− $(b t.b, a (dec a))
256+++ snag
257+ |* [a=@ b=(list)]
258+ ?~ b
259+ ~_ leaf+"snag-fail"
260+ !!
261+ ?: =(0 a) i.b
262+ $(b t.b, a (dec a))
256263```
257264
258265#### Examples
@@ -268,6 +275,7 @@ A noun.
268275```
269276
270277---
278+
271279### `++weld:nl`
272280
273281Concatenate
@@ -287,13 +295,13 @@ A list.
287295#### Source
288296
289297```hoon
290− ++ weld
291− |* [a=(list) b=(list)]
292− => .(a ^+((le a) a), b ^+((le b) b))
293− =+ 42
294− |-
295− ?~ a b
296− [i=i.a t=$(a t.a)]
298+++ weld
299+ |* [a=(list) b=(list)]
300+ => .(a ^+((le a) a), b ^+((le b) b))
301+ =+ 42
302+ |-
303+ ?~ a b
304+ [i=i.a t=$(a t.a)]
297305```
298306
299307#### Examples
content/docs/hoon/reference/stdlib/2n.md+144−130
@@ -4,6 +4,38 @@ weight = 17
44template = "doc.html"
55+++
66
7+### `++aftr`
8+
9+Pair after
10+
11+`+aftr` first takes gate `a`, producing a wet gate. The new wet gate then takes `b`, producing the inverted pair of `[b a]`. This is the inverted version of [+fore](#fore).
12+
13+#### Accepts
14+
15+`a` is a gate, and the sample of `+aftr`.
16+
17+`b` is a gate, and the sample of `(aftr a)`.
18+
19+#### Produces
20+
21+`(pair b a)`.
22+
23+#### Source
24+
25+```hoon
26+++ aftr |*(a=$-(* *) |*(b=$-(* *) (pair b a)))
27+```
28+
29+#### Examples
30+
31+```
32+> =a (aftr @ud)
33+> `(a @t)`['foo' 42]
34+[p='foo' q=42]
35+```
36+
37+---
38+
739### `++cork`
840
941Compose forward
@@ -52,7 +84,7 @@ Build `f` such that
5284#### Source
5385
5486```hoon
55−++ corl :: compose backwards
87+++ corl
5688 |* [a=$-(* *) b=$-(* *)]
5789 =< +:|.((a (b))) :: type check
5890 =+ c=+<.b
@@ -88,10 +120,11 @@ A gate.
88120#### Source
89121
90122```hoon
91− ++ curr
92− |* [a=_|=(^ **) c=*}
93− |* b=_+<+.a
94− (a b c)
123+++ curr
124+ |* [a=$-(^ *) c=*]
125+ =+ b=+<+.a
126+ |@ ++ $ (a b c)
127+ --
95128```
96129
97130#### Examples
@@ -126,10 +159,11 @@ A gate.
126159#### Source
127160
128161```hoon
129− ++ cury
130− |* [a=_|=(^ **) b=*}
131− |* c=_+<+.a
132− (a b c)
162+++ cury
163+ |* [a=$-(^ *) b=*]
164+ =+ c=+<+.a
165+ |@ ++ $ (a b c)
166+ --
133167```
134168
135169#### Examples
@@ -145,74 +179,34 @@ A gate.
145179
146180---
147181
148−### `++hard`
182+### `++fore`
149183
150−Force remold
184+Pair before
151185
152−Demands that a specific type be produced, crashing the program if it is
153−not.
186+`+fore` first takes gate `a`, producing a wet gate. The new wet gate then takes `b`, producing the pair of `[a b]`.
154187
155−#### Source
156−
157−```hoon
158− ++ hard
159− |* han=gate
160− |= fud=* ^- han
161− ~_ leaf+"hard"
162− =+ gol=(han fud)
163− ?>(=(gol fud) gol)
164−```
165−
166−#### Examples
167−
168−```
169− > ((hard (list)) (limo [1 2 3 ~]))
170− ~[1 2 3]
171− > ((hard @) (add 2 2))
172− 4
173− > ((hard @t) (crip "Tape to cord, bro!"))
174− 'Tape to cord, bro'
175− > ((hard tape) (crip "...Tape to cord, bro?..."))
176− ! hard
177− ! exit
178−```
188+#### Accepts
179189
180−---
190+`a` is a gate, and is the sample of `+fore`.
181191
182−### `++soft`
192+`b` is a gate, and is the sample of `(fore a)`.
183193
184−Maybe remold
194+#### Produces
185195
186−Politely requests a specific type to be produced, producing null if it
187−is not.
196+`(pair a b)`.
188197
189198#### Source
190199
191200```hoon
192− ++ soft
193− |* han=gate
194− |= fud=* ^- (unit han)
195− =+ gol=(han fud)
196− ?.(=(gol fud) ~ [~ gol])
201+++ fore |*(a=$-(* *) |*(b=$-(* *) (pair a b)))
197202```
198203
199204#### Examples
200205
201206```
202− > ((soft %4) (add 2 2))
203− [~ %4]
204−
205− > ((soft @) (add 2 2))
206− [~ 4]
207−
208− > ((soft %5) (add 2 2))
209− ~
210−
211− > ((soft @t) (crip "Tape to cord, Woohoo!"))
212− [~ 'Tape to cord, Woohoo!']
213−
214− > ((soft @t) (trip 'Cmon man... Tape to cord? Please?!'))
215− ~
207+> =a (fore @ud)
208+> `(a @t)`[42 'foo']
209+[p=42 q='foo']
216210```
217211
218212---
@@ -229,25 +223,25 @@ A cell.
229223
230224#### Produces
231225
232−An atom.
226+A noun.
233227
234228#### Source
235229
236230```hoon
237− ++ head |*(^ ,:+<-)
231+++ head |*(^ ,:+<-)
238232```
239233
240234#### Examples
241235
242236```
243− > (head [1 2])
244− 1
237+> (head [1 2])
238+1
245239
246− > (head [[1 1] 2])
247− [1 1]
240+> (head [[1 1] 2])
241+[1 1]
248242
249− > (head "hello")
250− 'h'
243+> (head "hello")
244+'h'
251245```
252246
253247---
@@ -269,93 +263,49 @@ A noun.
269263#### Source
270264
271265```hoon
272− ++ same |*(* +<)
266+++ same |*(* +<)
273267```
274268
275269#### Examples
276270
277271```
278− > (same [1 2])
279− [1 2]
272+> (same [1 2])
273+[1 2]
280274
281− > (same [[1 1] 2])
282− [[1 1] 2]
275+> (same [[1 1] 2])
276+[[1 1] 2]
283277
284− > (same "hello")
285− "hello"
278+> (same "hello")
279+"hello"
286280```
287281
288282---
289283
290−### `++slog`
284+### `++succ`
291285
292−Deify printf
286+Successor
293287
294−Produces a stack trace if the stack trace isn't null, then produces the other
295−input.
288+Increment an atom.
296289
297290#### Accepts
298291
299−A `tang`.
292+An `atom`.
300293
301294#### Produces
302295
303−A `tang`.
296+An `atom`.
304297
305298#### Source
306299
307300```hoon
308− ++ slog
309− =| pri=@
310− |= a=tang ^+ same
311− ?~(a same ~>(%slog.[pri i.a] $(a t.a)))
301+++ succ |=(@ +(+<))
312302```
313303
314304#### Examples
315305
316306```
317− > =+ result=((slog [%leaf "error-message"]~) [12 13]) [%product result]
318− [%product 12 13]
319−```
320−
321−#### Discussion
322−
323−`slog` is intended to be put in the middle of a bunch of chained function
324−calls that string a piece of data through them, so that an error message will be
325−printed if there's one to print.
326−
327−---
328−
329−### `++mean`
330−
331−Crash and printf
332−
333−Ends the program and produces a `tang` tracing error message.
334−
335−#### Accepts
336−
337−`a` is a tang.
338−
339−#### Produces
340−
341−A crash.
342−
343−#### Source
344−
345−```hoon
346− ++ mean
347− |= a=tang
348− ^+ !!
349− ?~ a !!
350− ~_(i.a $(a t.a))
351−```
352−
353−#### Examples
354−
355−```
356− > ~>(%mean.[%leaf "fuse-loop"] !!)
357− ####
358− !! crash
307+> (succ 1)
308+2
359309```
360310
361311---
@@ -377,7 +327,7 @@ A noun.
377327#### Source
378328
379329```hoon
380− ++ tail |*(^ ,:+<+)
330+++ tail |*(^ ,:+<+)
381331```
382332
383333#### Examples
@@ -414,7 +364,7 @@ A flag.
414364#### Source
415365
416366```hoon
417− ++ test |=(^ =(+<- +<+))
367+++ test |=(^ =(+<- +<+))
418368```
419369
420370#### Examples
@@ -434,3 +384,67 @@ A flag.
434384```
435385
436386---
387+
388+### `++lead`
389+
390+Put head
391+
392+`(lead a)` produces a wet gate, then `((lead a) b)` produces `[a b]`.
393+
394+#### Accepts
395+
396+`a` is a noun, and is the sample of `+lead`.
397+
398+`b` is a noun, and is the sample of `((lead a) b)`
399+
400+#### Produces
401+
402+A cell of `[a b]`.
403+
404+#### Source
405+
406+```hoon
407+++ lead |*(* |*(* [+>+< +<]))
408+```
409+
410+#### Examples
411+
412+```
413+> =a (lead 'foo')
414+> (a 'bar')
415+['foo' 'bar']
416+```
417+
418+---
419+
420+### `++late`
421+
422+Put tail
423+
424+`(late a)` produces a wet gate, then `((late a) b)` produces the inverted cell `[b a]`. This is the inverted version of [+lead](#lead).
425+
426+#### Accepts
427+
428+`a` is a noun, and is the sample of `+late`.
429+
430+`b` is a noun, and is the sample of `(late a)`.
431+
432+#### Produces
433+
434+A cell of `[b a]`.
435+
436+#### Source
437+
438+```hoon
439+++ late |*(* |*(* [+< +>+<]))
440+```
441+
442+#### Examples
443+
444+```
445+> =a (late 'foo')
446+> (a 'bar')
447+['bar' 'foo']
448+```
449+
450+---
content/docs/hoon/reference/stdlib/5c.md+77−1
@@ -4,4 +4,80 @@ weight = 45
44template = "doc.html"
55+++
66
7−(To be documented)
7+(To be fully documented)
8+
9+## `++slog`
10+
11+Deify printf
12+
13+Prints stack trace `a` if the stack trace isn't null, then produces the other
14+input. `+slog` first takes `a`, producing a gate. The gate then takes some hoon.
15+
16+#### Accepts
17+
18+`a` is a `tang`, and is the sample of `+slog`.
19+
20+`(slog a)` takes some `hoon`.
21+
22+#### Produces
23+
24+The result of the hoon given to `(slog a)`, with `a` printed to the terminal.
25+
26+#### Source
27+
28+```hoon
29+++ slog
30+ =| pri=@
31+ |= a=tang ^+ same
32+ ?~(a same ~>(%slog.[pri i.a] $(a t.a)))
33+```
34+
35+#### Examples
36+
37+```
38+foo
39+> ((slog leaf+"foo" ~) (add 1 1))
40+2
41+```
42+
43+#### Discussion
44+
45+`slog` is intended to be put in the middle of a bunch of chained function
46+calls that string a piece of data through them, so that an error message will be
47+printed if there's one to print.
48+
49+---
50+
51+## `++mean`
52+
53+Crash and printf
54+
55+Ends the program and prints `a`, a tracing error message.
56+
57+#### Accepts
58+
59+`a` is a `tang`.
60+
61+#### Produces
62+
63+A crash, with `a` printed to the terminal.
64+
65+#### Source
66+
67+```hoon
68+++ mean
69+ |= a=tang
70+ ^+ !!
71+ ?~ a !!
72+ ~_(i.a $(a t.a))
73+```
74+
75+#### Examples
76+
77+```
78+> (mean leaf+"foo" ~)
79+foo
80+dojo: hoon expression failed
81+```
82+
83+---
content/docs/hoon/reference/stdlib/table-of-contents.md+19−9
@@ -26,6 +26,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
2626<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrh' title="Add (halfprecision float)"><code>++add:rh</code></a>
2727<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrs' title="Add (singleprecision float)"><code>++add:rs</code></a>
2828<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrq' title="Add (quadprecision float)"><code>++add:rq</code></a>
29+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#aftr' title="Pair after"><code>++aftr</code></a>
2930<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#ag' title="Toplevel atom parser engine"><code>++ag</code></a>
3031<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#alf' title="Parse alphabetic characters"><code>++alf</code></a>
3132<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#allby' title="Logical AND (map and wet gate)"><code>++all:by</code></a>
@@ -38,6 +39,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
3839<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#apeag' title="Parse 0 or rule"><code>++ape:ag</code></a>
3940<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#aptby' title="Check correctness (map)"><code>++apt:by</code></a>
4041<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#aptin' title="Check correctness (set)"><code>++apt:in</code></a>
42+<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#aptto' title="Check correctness of queue"><code>++apt:to</code></a>
4143<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#at' title="(Undocumented)"><code>++at</code></a>
4244<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#aura' title="'Type' of atom"><code>++aura</code></a>
4345<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#axis' title="Nock axis"><code>++axis</code></a>
@@ -214,6 +216,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
214216<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmarq' title="Fused multiplyadd (quadprecision float)"><code>++fma:rq</code></a>
215217<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#fo' title="Modulo prime"><code>++fo</code></a>
216218<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#foot' title="Cases of arms by variance model"><code>++foot</code></a>
219+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#fore' title="Pair before"><code>++fore</code></a>
217220<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fosrh' title="@rs to @rh"><code>++fos:rh</code></a>
218221<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frafo' title="Divide (modular base)"><code>++fra:fo</code></a>
219222<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frasi' title="Divide (signed integer)"><code>++fra:si</code></a>
@@ -229,6 +232,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
229232<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#gar' title="Parse > (gar)"><code>++gar</code></a>
230233<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gasby' title="Concatenate (map)"><code>++gas:by</code></a>
231234<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#gasin' title="Concatenate (set)"><code>++gas:in</code></a>
235+<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#gasju' title="Concatenate (jug)"><code>++gas:ju</code></a>
232236<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#gasto' title="Push list into queue"><code>++gas:to</code></a>
233237<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#gate' title="Function"><code>++gate</code></a>
234238<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#gaw' title="Classic whitespace"><code>++gaw</code></a>
@@ -267,7 +271,6 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
267271### h
268272
269273<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>++hair</code></a>
270−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#hard' title="Force remold"><code>++hard</code></a>
271274<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#hasby' title="Key existence check (map)"><code>++has:by</code></a>
272275<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#hasin' title="Key existence check (set)"><code>++has:in</code></a>
273276<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
@@ -324,6 +327,8 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
324327### l
325328
326329<a class="tooltip" href='/docs/hoon/reference/stdlib/4d/#last' title="Further trace"><code>++last</code></a>
330+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#late' title="Put tail"><code>++late</code></a>
331+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#lead' title="Put head"><code>++lead</code></a>
327332<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#lenl' title="Construct list from nullterminated noun"><code>++le:nl</code></a>
328333<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#lent' title="List length"><code>++lent</code></a>
329334<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#levy' title="Logical AND on list"><code>++levy</code></a>
@@ -376,7 +381,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
376381<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#mate' title="Choose"><code>++mate</code></a>
377382<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#max' title="Maximum"><code>++max</code></a>
378383<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#meff' title="Minimum exponent of ff"><code>++me:ff</code></a>
379−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#mean' title="Crash and printf"><code>++mean</code></a>
384+<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/#mean' title="Crash and printf"><code>++mean</code></a>
380385<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#mes' title="Parse hexabyte"><code>++mes</code></a>
381386<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#mesc' title="Escape special characters"><code>++mesc</code></a>
382387<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#met' title="Measure"><code>++met</code></a>
@@ -615,7 +620,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
615620<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slav' title="Demand: parse cord with input aura"><code>++slav</code></a>
616621<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slaw' title="Parse cord to input aura"><code>++slaw</code></a>
617622<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slay' title="Parse cord to coin"><code>++slay</code></a>
618−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#slog' title="Deify printf"><code>++slog</code></a>
623+<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/#slog' title="Deify printf"><code>++slog</code></a>
619624<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#slug' title="Use gate to parse delimited list"><code>++slug</code></a>
620625<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#smyt' title="Render path as tank"><code>++smyt</code></a>
621626<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snag' title="Produce element at specific index (list)"><code>++snag</code></a>
@@ -623,7 +628,6 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
623628<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snip' title="Drop tail off list"><code>++snip</code></a>
624629<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snoc' title="Append noun to list"><code>++snoc</code></a>
625630<a class="tooltip" href='/docs/hoon/reference/stdlib/4l/#so' title="Coin parser engine"><code>++so</code></a>
626−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#soft' title="Maybe remold"><code>++soft</code></a>
627631<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#some' title="Wrap value in unit"><code>++some</code></a>
628632<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#soq' title="Parse ' (soq)"><code>++soq</code></a>
629633<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#sort' title="Quicksort (list)"><code>++sort</code></a>
@@ -661,6 +665,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
661665<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrh' title="Subtract from halfprecision float"><code>++sub:rh</code></a>
662666<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrs' title="Subtract from singleprecision float"><code>++sub:rs</code></a>
663667<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrq' title="Subtract from quadprecision float"><code>++sub:rq</code></a>
668+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#succ' title="Successor"><code>++succ</code></a>
664669<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#sumfe' title="Sum two numbers in modular field"><code>++sum:fe</code></a>
665670<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#sumfo' title="Modular sum"><code>++sum:fo</code></a>
666671<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#sumsi' title="Addition (signed integer)"><code>++sum:si</code></a>
@@ -1019,6 +1024,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
10191024
10201025<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#ju' title="Jug operations"><code>++ju</code></a>
10211026<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#delju' title="Delete (jug)"><code>++del:ju</code></a>
1027+<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#gasju' title="Concatenate (jug)"><code>++gas:ju</code></a>
10221028<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#getju' title="Retrieve set"><code>++get:ju</code></a>
10231029<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
10241030<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#putju' title="Add keyset pair (jar)"><code>++put:ju</code></a>
@@ -1026,6 +1032,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
10261032### 2k: queue logic
10271033
10281034<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#to' title="Queue operations"><code>++to</code></a>
1035+<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#aptto' title="Check correctness of queue"><code>++apt:to</code></a>
10291036<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#balto' title="Balance queue"><code>++bal:to</code></a>
10301037<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#depto' title="Maximum depth (queue)"><code>++dep:to</code></a>
10311038<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#gasto' title="Push list into queue"><code>++gas:to</code></a>
@@ -1057,18 +1064,19 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
10571064
10581065### 2n: functional hacks
10591066
1067+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#aftr' title="Pair after"><code>++aftr</code></a>
10601068<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cork' title="Compose forward"><code>++cork</code></a>
10611069<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#corl' title="Compose backward"><code>++corl</code></a>
10621070<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#curr' title="Rightcurry a gate"><code>++curr</code></a>
10631071<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cury' title="Curry left a gate"><code>++cury</code></a>
1064−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#hard' title="Force remold"><code>++hard</code></a>
1072+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#fore' title="Pair before"><code>++fore</code></a>
10651073<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#head' title="Get head of cell"><code>++head</code></a>
1066−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#mean' title="Crash and printf"><code>++mean</code></a>
10671074<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#same' title="Identity (produces same value)"><code>++same</code></a>
1068−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#slog' title="Deify printf"><code>++slog</code></a>
1069−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#soft' title="Maybe remold"><code>++soft</code></a>
1075+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#succ' title="Successor"><code>++succ</code></a>
10701076<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#tail' title="Get tail of cell"><code>++tail</code></a>
10711077<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#test' title="Test for equality"><code>++test</code></a>
1078+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#lead' title="Put head"><code>++lead</code></a>
1079+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#late' title="Put tail"><code>++late</code></a>
10721080
10731081### 2o: normalizing containers
10741082
@@ -1720,7 +1728,9 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
17201728
17211729### 5c: compiler backend and prettyprinter
17221730
1723−<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/'>_(To be documented)_</a>
1731+<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/'>_(To be fully documented)_</a>
1732+<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/#slog' title="Deify printf"><code>++slog</code></a>
1733+<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/#mean' title="Crash and printf"><code>++mean</code></a>
17241734
17251735### 5d: parser
17261736
lib/glossary.js+51−16
@@ -1472,6 +1472,13 @@ export const glossary = [
14721472 slug: "https://urbit.org/docs/reference/library/3b/#addrq",
14731473 desc: "Used in the Hoon standard library.",
14741474 },
1475+ {
1476+ name: "Pair after",
1477+ symbol: "aftr",
1478+ usage: "stdlib",
1479+ slug: "https://urbit.org/docs/reference/library/2n/#aftr",
1480+ desc: "Used in the Hoon standard library.",
1481+ },
14751482 {
14761483 name: "Top-level atom parser engine",
14771484 symbol: "ag",
@@ -1556,6 +1563,13 @@ export const glossary = [
15561563 slug: "https://urbit.org/docs/reference/library/2h/#aptin",
15571564 desc: "Used in the Hoon standard library.",
15581565 },
1566+ {
1567+ name: "Check correctness (queue)",
1568+ symbol: "apt:to",
1569+ usage: "stdlib",
1570+ slug: "https://urbit.org/docs/reference/library/2k/#aptto",
1571+ desc: "Used in the Hoon standard library.",
1572+ },
15591573 {
15601574 name: "(Undocumented)",
15611575 symbol: "at",
@@ -2697,6 +2711,13 @@ export const glossary = [
26972711 slug: "https://urbit.org/docs/reference/library/4o/#foot",
26982712 desc: "Used in the Hoon standard library.",
26992713 },
2714+ {
2715+ name: "Pair before",
2716+ symbol: "fore",
2717+ usage: "stdlib",
2718+ slug: "https://urbit.org/docs/reference/library/2n/#aftr",
2719+ desc: "Used in the Hoon standard library.",
2720+ },
27002721 {
27012722 name: "@rs to @rh",
27022723 symbol: "fos:rh",
@@ -2781,6 +2802,13 @@ export const glossary = [
27812802 slug: "https://urbit.org/docs/reference/library/2h/#gasin",
27822803 desc: "Used in the Hoon standard library.",
27832804 },
2805+ {
2806+ name: "Concatenate (jug)",
2807+ symbol: "gas:ju",
2808+ usage: "stdlib",
2809+ slug: "https://urbit.org/docs/reference/library/2j/#gasju",
2810+ desc: "Used in the Hoon standard library.",
2811+ },
27842812 {
27852813 name: "Push list into queue",
27862814 symbol: "gas:to",
@@ -3026,13 +3054,6 @@ export const glossary = [
30263054 slug: "https://urbit.org/docs/reference/library/3g/#hair",
30273055 desc: "Used in the Hoon standard library.",
30283056 },
3029− {
3030− name: "Force remold",
3031− symbol: "hard",
3032− usage: "stdlib",
3033− slug: "https://urbit.org/docs/reference/library/2n/#hard",
3034− desc: "Used in the Hoon standard library.",
3035− },
30363057 {
30373058 name: "Key existence check (map)",
30383059 symbol: "has:by",
@@ -3348,6 +3369,13 @@ export const glossary = [
33483369 slug: "https://urbit.org/docs/reference/library/4d/#last",
33493370 desc: "Used in the Hoon standard library.",
33503371 },
3372+ {
3373+ name: "Put tail",
3374+ symbol: "late",
3375+ usage: "stdlib",
3376+ slug: "https://urbit.org/docs/reference/library/2n/#late",
3377+ desc: "Used in the Hoon standard library.",
3378+ },
33513379 {
33523380 name: "Construct list from null-terminated noun",
33533381 symbol: "le:nl",
@@ -3355,6 +3383,13 @@ export const glossary = [
33553383 slug: "https://urbit.org/docs/reference/library/2m/#lenl",
33563384 desc: "Used in the Hoon standard library.",
33573385 },
3386+ {
3387+ name: "Put head",
3388+ symbol: "lead",
3389+ usage: "stdlib",
3390+ slug: "https://urbit.org/docs/reference/library/2n/#lead",
3391+ desc: "Used in the Hoon standard library.",
3392+ },
33583393 {
33593394 name: "List length",
33603395 symbol: "lent",
@@ -3695,7 +3730,7 @@ export const glossary = [
36953730 name: "Crash and printf",
36963731 symbol: "mean",
36973732 usage: "stdlib",
3698− slug: "https://urbit.org/docs/reference/library/2n/#mean",
3733+ slug: "https://urbit.org/docs/reference/library/5c/#mean",
36993734 desc: "Used in the Hoon standard library.",
37003735 },
37013736 {
@@ -5228,7 +5263,7 @@ export const glossary = [
52285263 name: "Deify printf",
52295264 symbol: "slog",
52305265 usage: "stdlib",
5231− slug: "https://urbit.org/docs/reference/library/2n/#slog",
5266+ slug: "https://urbit.org/docs/reference/library/5c/#slog",
52325267 desc: "Used in the Hoon standard library.",
52335268 },
52345269 {
@@ -5280,13 +5315,6 @@ export const glossary = [
52805315 slug: "https://urbit.org/docs/reference/library/4l/#so",
52815316 desc: "Used in the Hoon standard library.",
52825317 },
5283− {
5284− name: "Maybe remold",
5285− symbol: "soft",
5286− usage: "stdlib",
5287− slug: "https://urbit.org/docs/reference/library/2n/#soft",
5288− desc: "Used in the Hoon standard library.",
5289− },
52905318 {
52915319 name: "Wrap value in unit",
52925320 symbol: "some",
@@ -5546,6 +5574,13 @@ export const glossary = [
55465574 slug: "https://urbit.org/docs/reference/library/3b/#subrq",
55475575 desc: "Used in the Hoon standard library.",
55485576 },
5577+ {
5578+ name: "Successor",
5579+ symbol: "succ",
5580+ usage: "stdlib",
5581+ slug: "https://urbit.org/docs/reference/library/2n/#succ",
5582+ desc: "Used in the Hoon standard library.",
5583+ },
55495584 {
55505585 name: "Sum two numbers in modular field",
55515586 symbol: "sum:fe",