on master help sign in
Merge pull request #1156 from tinnus-napbus/update-stdlib-2j-to-2n
4e2f053tinnus-napbus
content/docs/hoon/reference/stdlib/2j.md+263−155
@@ -4,25 +4,45 @@ weight = 13
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++ja`
7+## `++ja`
8
8
9Jar engine
9Jar engine
10
10
11−```hoon
11+A container arm for `jar` operation arms. A `jar` is a `map` of
12− |_ a=(jar)
12+`list`s. The contained arms inherit the sample jar.
13−```
14
13
15−A container arm for `++jar` operation arms. A `++jar` is a `++map` of
14+#### Accepts
16−`++list`s. The contained arms inherit the sample jar.
17
15
18`a` is a jar.
16`a` is a jar.
19
17
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+
20```
32```
21> ~(. ja (my [a+1 b+2 ~]))
33> ~(. ja (my [a+1 b+2 ~]))
22< 2.ngd
34< 2.ngd
35+ [ a
36+ ?(
37+ %~
38+ [ n=[?(p=%a p=%b) q=@ud]
23− [ a=?(%~ [n=[?(p=%a p=%b) q=@ud] l=nlr([p=?(%a %b) q=@ud]) r=nlr([p=?(%a %b) q=@ud])])
39+ l=nlr([p=?(%a %b) q=@ud])
40+ r=nlr([p=?(%a %b) q=@ud])
41+ ]
42+ )
24− <123.zao 45.xig 1.pnw %140>
43+ <123.zao 46.hgz 1.pnw %140>
25 ]
44 ]
45+>
26```
46```
27
47
28---
48---
@@ -31,37 +51,41 @@ A container arm for `++jar` operation arms. A `++jar` is a `++map` of
31
51
32Grab value by key
52Grab value by key
33
53
34−```hoon
54+Produces the list at key `b` in jar `a`.
35− ++ get :: gets list by key
36− |* b=*
37− =+ c=(~(get by a) b)
38− ?~(c ~ u.c)
39−```
40
55
41#### Accepts
56#### Accepts
42
57
43−`a` is a `++jar`.
58+`a` is a `jar`, and is the sample of `+ja`.
44
59
45−`b` is a key of the same type as the keys in `a`.
60+`b` is a noun.
46
61
47#### Produces
62#### Produces
48
63
49−A list retrieved from jar `a` using the key `b`.
64+A `list`.
50
65
51−Examples
66+#### Source
52
67
68+```hoon
69+++ get
70+ |* b=*
71+ =+ c=(~(get by a) b)
72+ ?~(c ~ u.c)
53```
73```
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]]]}]
57
74
58−> (~(get ja l) 'a')
75+#### Examples
59−[i=1 t=[i=2 t=~[3]]]
60
76
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+
61−> (~(get ja l) 'b')
82+> `(list @ud)`(~(get ja j) 'a')
62−[i=4 t=[i=5 t=~[6]]]
83+~[1 2 3]
63
84
64−> (~(get ja l) 'c')
85+> `(list @ud)`(~(get ja j) 'b')
86+~[4 5 6]
87+
88+> `(list @ud)`(~(get ja j) 'c')
65~
89~
66```
90```
67
91
@@ -71,114 +95,166 @@ Examples
71
95
72Prepend to list
96Prepend to list
73
97
74−#### Source
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`.
75−
76−```hoon
77− ++ add :: adds key-list pair
78− |* [b=* c=*]
79− =+ d=(get b)
80− (~(put by a) b [c d])
81−```
82
99
83#### Accepts
100#### Accepts
84
101
85−`a` is a jar.
102+`a` is a `jar`, and is the sample of `+ja`.
86
103
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`.
88
105
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+```
90
120
91#### Examples
121#### Examples
92
122
93```
123```
94−> =l (my [['a' (ly 1 2 3 ~)] ['b' (ly 4 5 6 ~)]~])
124+> =j `(jar @t @ud)`(malt ~[['a' `(list @ud)`~[1 2 3]] ['b' `(list @ud)`~[4 5 6]]])
95−> l
125+> j
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]]]]
126+{[p='b' q=~[4 5 6]] [p='a' q=~[1 2 3]]}
99− l=~
127+
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)
128+> `(jar @t @ud)`(~(add ja j) '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=~]]
129+{[p='b' q=~[7 4 5 6]] [p='a' q=~[1 2 3]]}
130+
106−> (~(add ja l) 'c' 7)
131+> `(jar @t @ud)`(~(add ja j) 'c' 8)
107−[ n=[p='b' q=[i=4 t=[i=5 t=~[6]]]]
132+{[p='b' q=~[4 5 6]] [p='a' q=~[1 2 3]] [p='c' q=~[8]]}
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
114```
133```
115
134
116−\*\*
135+---
117
136
118−### `++ju`
137+## `++ju`
119
138
120Jug operations
139Jug operations
121
140
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+
122```hoon
154```hoon
123− ++ ju :: jug engine
155+++ ju
124− |/ a=(jug)
156+ =| a=(tree (pair * (tree))) :: (jug)
157+ |@
125```
158```
126
159
127−Container arm for jug operation arms. A `++jug` is a `++map` of
160+#### Example
128−`++sets`. The contained arms inherit its sample jug, `a`.
129−
130−`a` is a jug.
131
161
132```
162```
133−> ~(. ju (my [[a (sy 1 ~)] [b (sy 2 ~)] ~]))
163+> =j `(jug @t @ud)`(malt ~[['a' (silt ~[1 2 3])] ['b' (silt ~[4 5 6])]])
134−< 5.cws
164+> j
135− [ a
165+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
136− ?(
166+
137− %~
167+> ~(. ju j)
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>
168+<5.cws [a=nlr([p=@t q=nlr(@ud)]) <123.zao 46.hgz 1.pnw %140>]>
144− ]
145```
169```
146
170
171+---
172+
147### `++del:ju`
173### `++del:ju`
148
174
149Remove
175Remove
150
176
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+
151#### Source
187#### Source
152
188
153```hoon
189```hoon
154− ++ del :: del key-set pair
190+++ del
155− |* [b=* c=*]
191+ |* [b=* c=*]
156− ^+ a
192+ ^+ a
157− =+ d=(get b)
193+ =+ d=(get b)
158− =+ e=(~(del in d) c)
194+ =+ e=(~(del in d) c)
159− ?~ e
195+ ?~ e
160− (~(del by a) b)
196+ (~(del by a) b)
161− (~(put by a) b e)
197+ (~(put by a) b e)
162```
198```
163
199
164−Produces jug `a` with value `c` removed from set located at key `b`.
200+#### Examples
165
201
166−`a` is a jug.
202+```
203+> j
204+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
167
205
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}]}
169
208
170−`c` is the value of the same type of the keys in `a` that is to be
209+> `(jug @t @ud)`(~(del ju j) 'b' 10)
171−removed.
210+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
172
211
212+> `(jug @t @ud)`(~(del ju j) 'c' 10)
213+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
173```
214```
174− > s
175− [[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
176
215
177− > (~(del ju s) 'a' 1)
216+---
178− {[p='a' q={3 2}] [p='b' q={5 4 6}]}
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`.
179
227
180− > (~(del ju s) 'c' 7)
228+`b` is a `(list [p q])`, where:
181− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
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}]}
182```
258```
183
259
184---
260---
@@ -187,28 +263,42 @@ removed.
187
263
188Retrieve set
264Retrieve set
189
265
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+
190```hoon
280```hoon
191− ++ get :: gets set by key
281+++ get
192− |* b=*
282+ |* b=*
193− =+ c=(~(get by a) b)
283+ =+ c=(~(get by a) b)
194− ?~(c ~ u.c)
284+ ?~(c ~ u.c)
195```
285```
196
286
197−Produces a set retrieved from jar `a` using key `b`.
287+#### Examples
198
288
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}]}
200
293
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}
202
296
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')
297+> `(set @ud)`(~(get ju j) 'b')
209− {5 4 6}
298+{5 6 4}
299+
210− > (~(get ju s) 'c')
300+> `(set @ud)`(~(get ju j) 'c')
211− ~
301+{}
212```
302```
213
303
214---
304---
@@ -217,37 +307,45 @@ Produces a set retrieved from jar `a` using key `b`.
217
307
218Check contents
308Check contents
219
309
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+
220```hoon
327```hoon
221− ++ has :: existence check
328+++ has
222− |* [b=* c=*]
329+ |* [b=* c=*]
223− ^- ?
330+ ^- ?
224− (~(has in (get b)) c)
331+ (~(has in (get b)) c)
225```
332```
226
333
227−Computes whether a value `c` exists within the set located at key `b`
334+#### Examples
228−with jar `a`. Produces a loobean.
229
335
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}]}
231
340
232−`b` is a key as a noun.
341+> (~(has ju j) 'b' 5)
342+%.y
233
343
234−`c` is a value as a noun.
344+> (~(has ju j) 'b' 10)
345+%.n
235
346
236−```
237− > s
238− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
239− > (~(has ju s) 'a' 3)
347+> (~(has ju j) 'c' 10)
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
348+%.n
251```
349```
252
350
253---
351---
@@ -256,34 +354,44 @@ with jar `a`. Produces a loobean.
256
354
257Add key-set pair
355Add key-set pair
258
356
259−```hoon
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`.
260− ++ put :: add key-set pair
358+
261− |* [b=* c=*]
359+#### Accepts
262− ^+ a
263− =+ d=(get b)
264− (~(put by a) b (~(put in d) c))
265−```
266
360
267−Produces jar `a` with `c` added to the set value located at key `b`.
361+`a` is a `jug`.
268
362
269−`a` is a set.
363+`b` is a noun, the type of the keys in `a`.
270
364
271−`b` is a key as a noun.
365+`c` is a noun, the type the sets in `a` contain.
272
366
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
274
382
275```
383```
276− > s
384+> j
277− [p='a' q=[1 3 2]] [p='b' q=[5 4 6]]]
385+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
278
386
279− > (~(put ju s) 'a' 7)
387+> `(jug @t @ud)`(~(put ju j) 'c' 5)
280− {[p='a' q={7 1 3 2}] [p='b' q={5 4 6}]}
388+{[p='b' q={5 6 4}] [p='a' q={1 2 3}] [p='c' q={5}]}
281
389
282− > (~(put ju s) 'a' 1)
390+> `(jug @t @ud)`(~(put ju j) 'a' 4)
283− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
391+{[p='b' q={5 6 4}] [p='a' q={1 2 3 4}]}
284
392
285− > (~(put ju s) 'c' 7)
393+> `(jug @t @ud)`(~(put ju j) 'a' 1)
286− {[p='a' q={1 3 2}] [p='c' q={7}] [p='b' q={5 4 6}]}
394+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
287```
395```
288
396
289---
397---
content/docs/hoon/reference/stdlib/2k.md+191−135
@@ -4,8 +4,7 @@ weight = 14
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++to`
7+## `++to`
8−
9
8
10Queue operations
9Queue operations
11
10
@@ -19,8 +18,9 @@ sample queue.
19#### Source
18#### Source
20
19
21```hoon
20```hoon
22− ++ to
21+++ to
23− |_ a=(tree)
22+ =| a=(tree) :: (qeu)
23+ |@
24```
24```
25
25
26#### Discussion
26#### Discussion
@@ -31,50 +31,99 @@ interfaces. `to` is the interface core for `qeu`; it's not generic across all
31the different containers that use `tree`.
31the different containers that use `tree`.
32
32
33---
33---
34−### `++bal:to`
35
34
36−Balance
35+### `+apt:to`
37
36
38−Vertically rebalances queue `a`.
37+Check correctness
38+
39+Test whether queue `a` is correctly ordered, producing a flag.
39
40
40#### Accepts
41#### Accepts
41
42
42−`a` is a queue.
43+`a` is a `que`.
43
44
44#### Produces
45#### Produces
45
46
46−A queue.
47+A `?`.
47
48
48#### Source
49#### Source
49
50
50```hoon
51```hoon
51− ++ bal
52+++ apt
52− |- ^+ a
53+ |- ^- ?
53− ?~ a ~
54+ ?~ a &
54− ?. |(?=(~ l.a) (mor n.a n.l.a))
55+ ?& ?~(l.a & ?&((mor n.a n.l.a) $(a l.a)))
55− $(a l.a(r $(a a(l r.l.a))))
56− ?. |(?=(~ r.a) (mor n.a n.r.a))
56+ ?~(r.a & ?&((mor n.a n.r.a) $(a r.a)))
57− $(a r.a(l $(a a(r l.r.a))))
57+ ==
58− a
59```
58```
60
59
61#### Examples
60#### Examples
62
61
63```
62```
64− > `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
63+> =bad `(qeu @ud)`[1 ~ 2 ~ 3 ~ ~]
65− {"a" "b" "c" "d" "e" "f" "g"}
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
66
85
67− > `*`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
86+`a` is a `qeu`.
68− [[97 0] 0 [98 0] 0 [99 0] 0 [100 0] 0 [101 0] 0 [102 0] 0 [103 0] 0 0]
69
87
70− > ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
88+#### Produces
71− [n=[i='d' t=""] l={"a" "b" "c"} r={"e" "f" "g"}]
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
72
106
73− > `*`~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
107+```
74− [[100 0] [[99 0] [[98 0] [[97 0] 0 0] 0] 0] [101 0] 0 [102 0] 0 [103 0] 0 0]
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
75```
123```
76
124
77---
125---
126+
78### `++dep:to`
127### `++dep:to`
79
128
80Maximum Depth
129Maximum Depth
@@ -92,35 +141,36 @@ An atom.
92#### Source
141#### Source
93
142
94```hoon
143```hoon
95− ++ dep :: max depth of queue
144+++ dep
96− |- ^- @
145+ |- ^- @
97− ?~ a 0
146+ ?~ a 0
98− +((max $(a l.a) $(a r.a)))
147+ +((max $(a l.a) $(a r.a)))
99```
148```
100
149
101#### Examples
150#### Examples
102
151
103```
152```
104− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 7 ~])
153+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 7 ~])
105− > ~(dep to a)
154+> ~(dep to a)
106− 4
155+4
107
156
108− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 ~])
157+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 ~])
109− > ~(dep to a)
158+> ~(dep to a)
110− 3
159+3
111
160
112− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 ~])
161+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 ~])
113− > ~(dep to a)
162+> ~(dep to a)
114− 2
163+2
115
164
116− > ~(dep to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
165+> ~(dep to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
117− 7
166+7
118
167
119− > ~(dep to ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]))
168+> ~(dep to ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]))
120− 4
169+4
121```
170```
122
171
123---
172---
173+
124### `++gas:to`
174### `++gas:to`
125
175
126Push list
176Push list
@@ -129,7 +179,7 @@ Push all elements of list `b` into the queue `a`.
129
179
130#### Accepts
180#### Accepts
131
181
132−`a` is a queue.
182+`a` is a queue, and is the sample of `+to`.
133
183
134`b` is a list.
184`b` is a list.
135
185
@@ -140,25 +190,26 @@ A queue.
140#### Source
190#### Source
141
191
142```hoon
192```hoon
143− ++ gas :: insert list to que
193+++ gas
144− |= b=(list _?>(?=(^ a) n.a))
194+ |= b=(list _?>(?=(^ a) n.a))
145− |- ^+ a
195+ |- ^+ a
146− ?~(b a $(b t.b, a (put i.b)))
196+ ?~(b a $(b t.b, a (put i.b)))
147```
197```
148
198
149−
150#### Examples
199#### Examples
151
200
152```
201```
153− > `(qeu)`(~(gas to `(qeu @)`~) [1 2 3 ~])
202+> `(qeu)`(~(gas to `(qeu @)`~) [1 2 3 ~])
154− {3 2 1}
203+{3 2 1}
155
204
156− > =a (~(gas to `(qeu @)`~) [1 2 3 ~])
205+> =a (~(gas to `(qeu @)`~) [1 2 3 ~])
157− > =b [4 5 6 ~]
206+> =b [4 5 6 ~]
158− > `(qeu)`(~(gas to a) b)
207+> `(qeu)`(~(gas to a) b)
159− {6 5 4 3 2 1}
208+{6 5 4 3 2 1}
160```
209```
210+
161---
211---
212+
162### `++get:to`
213### `++get:to`
163
214
164Head-tail pair
215Head-tail pair
@@ -176,31 +227,32 @@ A cell of the last element in `a` along with the rest of queue `a`.
176#### Source
227#### Source
177
228
178```hoon
229```hoon
179− ++ get :: head-rest pair
230+++ get
180− |- ^+ ?>(?=(^ a) [p=n.a q=*(tree _n.a)])
231+ |- ^+ ?>(?=(^ a) [p=n.a q=*(tree _n.a)])
181− ?~ a
232+ ?~ a
182− !!
233+ !!
183− ?~ r.a
234+ ?~ r.a
184− [n.a l.a]
235+ [n.a l.a]
185− =+ b=$(a r.a)
236+ =+ b=$(a r.a)
186− :- p.b
237+ :- p.b
187− ?: |(?=(~ q.b) (mor n.a n.q.b))
238+ ?: |(?=(~ q.b) (mor n.a n.q.b))
188− a(r q.b)
239+ a(r q.b)
189− a(n n.q.b, l a(r l.q.b), r r.q.b)
240+ a(n n.q.b, l a(r l.q.b), r r.q.b)
190```
241```
191
242
192#### Examples
243#### Examples
193
244
194```
245```
195− > =s (~(gas to *(tree @)) `(list @)`~[1 2 3])
246+> =s (~(gas to *(tree @)) `(list @)`~[1 2 3])
196− > ~(get to s)
247+> ~(get to s)
197− [n=2 l={3} r={1}]
248+[n=2 l={3} r={1}]
198
249
199− > ~(get to ~)
250+> ~(get to ~)
200− ! exit
251+! exit
201```
252```
202
253
203---
254---
255+
204### `++nap:to`
256### `++nap:to`
205
257
206Remove head
258Remove head
@@ -218,39 +270,40 @@ A queue.
218#### Source
270#### Source
219
271
220```hoon
272```hoon
221− ++ nap :: removes root
273+++ nap
222− ?> ?=(^ a)
274+ ?> ?=(^ a)
223− ?: =(~ l.a) r.a
275+ ?: =(~ l.a) r.a
224− =+ b=get(a l.a)
276+ =+ b=get(a l.a)
225− bal(n.a p.b, l.a q.b)
277+ bal(n.a p.b, l.a q.b)
226```
278```
227
279
228#### Examples
280#### Examples
229
281
230```
282```
231− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
283+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
232− > -.a
284+> -.a
233− n=6
285+n=6
234
286
235− > =b ~(nap to a)
287+> =b ~(nap to a)
236− > -.b
288+> -.b
237− n=2
289+n=2
238
290
239− > a
291+> a
240− [n=6 l={} r={5 4 3 2 1}]
292+[n=6 l={} r={5 4 3 2 1}]
241
293
242− > b
294+> b
243− [n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
295+[n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
244
296
245− > `(qeu)`b
297+> `(qeu)`b
246− {5 4 3 2 1}
298+{5 4 3 2 1}
247
299
248− > `(qeu)`a
300+> `(qeu)`a
249− {6 5 4 3 2 1}
301+{6 5 4 3 2 1}
250```
302```
251
303
252---
304---
305+
253−### `++nip:to`
306+### `++nip:to`
254
307
255Removes the root of queue `a`, producing the resulting queue.
308Removes the root of queue `a`, producing the resulting queue.
256
309
@@ -265,40 +318,41 @@ A queue.
265#### Source
318#### Source
266
319
267```hoon
320```hoon
268− ++ nip :: removes root
321+++ nip
269− |- ^+ a
322+ |- ^+ a
270− ?~ a ~
323+ ?~ a ~
271− ?~ l.a r.a
324+ ?~ l.a r.a
272− ?~ r.a l.a
325+ ?~ r.a l.a
273− ?: (mor n.l.a n.r.a)
326+ ?: (mor n.l.a n.r.a)
274− l.a(r $(l.a r.l.a))
327+ l.a(r $(l.a r.l.a))
275− r.a(l $(r.a l.r.a))
328+ r.a(l $(r.a l.r.a))
276```
329```
277
330
278#### Examples
331#### Examples
279
332
280```
333```
281− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
334+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
282− > a
335+> a
283− [n=6 l={} r={5 4 3 2 1}]
336+[n=6 l={} r={5 4 3 2 1}]
284
337
285− > ~(nip to a)
338+> ~(nip to a)
286− [n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
339+[n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
287```
340```
288
341
289---
342---
343+
290### `++put:to`
344### `++put:to`
291
345
292Insert
346Insert
293
347
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
295resulting queue.
349resulting queue.
296
350
297#### Accepts
351#### Accepts
298
352
299−`a` is a queue.
353+`a` is a queue, and is the sample of `+to`.
300
354
301−`b` is any noun.
355+`b` is a noun.
302
356
303#### Produces
357#### Produces
304
358
@@ -307,23 +361,24 @@ A queue.
307#### Source
361#### Source
308
362
309```hoon
363```hoon
310− ++ put :: insert new tail
364+++ put
311− |* b=*
365+ |* b=*
312− |- ^+ a
366+ |- ^+ a
313− ?~ a
367+ ?~ a
314− [b ~ ~]
368+ [b ~ ~]
315− bal(l.a $(a l.a))
369+ bal(l.a $(a l.a))
316```
370```
317
371
318#### Examples
372#### Examples
319
373
320```
374```
321− > =a (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
375+> =a (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
322− > `(qeu)`(~(put to a) 7)
376+> `(qeu)`(~(put to a) 7)
323− {7 6 5 4 2 1 3}
377+{7 6 5 4 2 1 3}
324```
378```
325
379
326---
380---
381+
327### `++tap:to`
382### `++tap:to`
328
383
329Queue to list
384Queue to list
@@ -341,26 +396,28 @@ A list.
341#### Source
396#### Source
342
397
343```hoon
398```hoon
344− ++ tap :: adds list to end
399+++ tap
345− =+ b=`(list _?>(?=(^ a) n.a))`~
400+ =+ b=`(list _?>(?=(^ a) n.a))`~
346− |- ^+ b
401+ |- ^+ b
347− =+ 0 :: hack for jet match
402+ =+ 0 :: hack for jet match
348− ?~ a
403+ ?~ a
349− b
404+ b
350− $(a r.a, b [n.a $(a l.a)])
405+ $(a r.a, b [n.a $(a l.a)])
351```
406```
352
407
353#### Examples
408#### Examples
354
409
355```
410```
356− > =a (~(gas to `(qeu @)`~) [3 1 2 4 5 6 ~])
411+> =a (~(gas to `(qeu @)`~) [3 1 2 4 5 6 ~])
357− > `*`a
412+> `*`a
358− [6 0 2 [4 [5 0 0] 0] 1 0 3 0 0]
413+[6 0 2 [4 [5 0 0] 0] 1 0 3 0 0]
414+
359− > ~(tap to a)
415+> ~(tap to a)
360− ~[3 1 2 4 5 6]
416+~[3 1 2 4 5 6]
361```
417```
362
418
363---
419---
420+
364### `++top:to`
421### `++top:to`
365
422
366Produce head
423Produce head
@@ -378,19 +435,18 @@ A unit.
378#### Source
435#### Source
379
436
380```hoon
437```hoon
381− ++ top :: produces head
438+++ top
382− |- ^- (unit _?>(?=(^ a) n.a))
439+ |- ^- (unit _?>(?=(^ a) n.a))
383− ?~ a ~
440+ ?~ a ~
384− ?~(r.a [~ n.a] $(a r.a))
441+ ?~(r.a [~ n.a] $(a r.a))
385− --
386```
442```
387
443
388#### Examples
444#### Examples
389
445
390```
446```
391− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
447+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
392− > ~(top to a)
448+> ~(top to a)
393− [~ u=1]
449+[~ u=1]
394```
450```
395
451
396#### Discussion
452#### Discussion
content/docs/hoon/reference/stdlib/2m.md+40−32
@@ -4,7 +4,7 @@ weight = 16
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++ly`
7+## `++ly`
8
8
9List from raw noun
9List from raw noun
10
10
@@ -40,7 +40,8 @@ A `list`.
40`ly` is an alias for `le:nl`.
40`ly` is an alias for `le:nl`.
41
41
42---
42---
43+
43−### `++my`
44+## `++my`
44
45
45Map from raw noun
46Map from raw noun
46
47
@@ -73,7 +74,8 @@ A `map`.
73`my` is an alias for `my:nl`.
74`my` is an alias for `my:nl`.
74
75
75---
76---
77+
76−### `++sy`
78+## `++sy`
77
79
78Set from raw noun
80Set from raw noun
79
81
@@ -112,7 +114,8 @@ A `set`.
112`sy` is an alias for `si:nl`.
114`sy` is an alias for `si:nl`.
113
115
114---
116---
117+
115−### `++nl`
118+## `++nl`
116
119
117Noun-to-container operations
120Noun-to-container operations
118
121
@@ -127,6 +130,7 @@ nouns.
127```
130```
128
131
129---
132---
133+
130### `++le:nl`
134### `++le:nl`
131
135
132Construct list
136Construct list
@@ -144,12 +148,12 @@ A list.
144#### Source
148#### Source
145
149
146```hoon
150```hoon
147− ++ le :: construct list
151+++ le
148− |* a=(list)
152+ |* a=(list)
149− ^+ =< $
153+ ^+ =< $
150− |@ ++ $ ?:(*? ~ [i=(snag 0 a) t=$])
154+ |@ ++ $ ?:(*? ~ [i=(snag 0 a) t=$])
151− --
155+ --
152− a
156+ a
153```
157```
154
158
155#### Examples
159#### Examples
@@ -163,6 +167,7 @@ A list.
163```
167```
164
168
165---
169---
170+
166### `++my:nl`
171### `++my:nl`
167
172
168Construct map
173Construct map
@@ -181,10 +186,10 @@ A map.
181#### Source
186#### Source
182
187
183```hoon
188```hoon
184− ++ my
189+++ my
185− |* a=(list (pair))
190+ |* a=(list (pair))
186− => .(a ^+((le a) a))
191+ => .(a ^+((le a) a))
187− (~(gas by `(map _p.i.-.a _q.i.-.a)`~) a)
192+ (~(gas by `(map _p.i.-.a _q.i.-.a)`~) a)
188```
193```
189
194
190#### Examples
195#### Examples
@@ -195,6 +200,7 @@ A map.
195```
200```
196
201
197---
202---
203+
198### `++si:nl`
204### `++si:nl`
199
205
200Construct set
206Construct set
@@ -212,10 +218,10 @@ A set.
212#### Source
218#### Source
213
219
214```hoon
220```hoon
215− ++ si
221+++ si
216− |* a=(list)
222+ |* a=(list)
217− => .(a ^+((le a) a))
223+ => .(a ^+((le a) a))
218− (~(gas in `(set _i.-.a)`~) a)
224+ (~(gas in `(set _i.-.a)`~) a)
219```
225```
220
226
221#### Examples
227#### Examples
@@ -226,6 +232,7 @@ A set.
226```
232```
227
233
228---
234---
235+
229### `++snag:nl`
236### `++snag:nl`
230
237
231Index
238Index
@@ -246,13 +253,13 @@ A noun.
246#### Sources
253#### Sources
247
254
248```hoon
255```hoon
249− ++ snag
256+++ snag
250− |* [a=@ b=(list)]
257+ |* [a=@ b=(list)]
251− ?~ b
258+ ?~ b
252− ~_ leaf+"snag-fail"
259+ ~_ leaf+"snag-fail"
253− !!
260+ !!
254− ?: =(0 a) i.b
261+ ?: =(0 a) i.b
255− $(b t.b, a (dec a))
262+ $(b t.b, a (dec a))
256```
263```
257
264
258#### Examples
265#### Examples
@@ -268,6 +275,7 @@ A noun.
268```
275```
269
276
270---
277---
278+
271### `++weld:nl`
279### `++weld:nl`
272
280
273Concatenate
281Concatenate
@@ -287,13 +295,13 @@ A list.
287#### Source
295#### Source
288
296
289```hoon
297```hoon
290− ++ weld
298+++ weld
291− |* [a=(list) b=(list)]
299+ |* [a=(list) b=(list)]
292− => .(a ^+((le a) a), b ^+((le b) b))
300+ => .(a ^+((le a) a), b ^+((le b) b))
293− =+ 42
301+ =+ 42
294− |-
302+ |-
295− ?~ a b
303+ ?~ a b
296− [i=i.a t=$(a t.a)]
304+ [i=i.a t=$(a t.a)]
297```
305```
298
306
299#### Examples
307#### Examples
content/docs/hoon/reference/stdlib/2n.md+144−130
@@ -4,6 +4,38 @@ weight = 17
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
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+
7### `++cork`
39### `++cork`
8
40
9Compose forward
41Compose forward
@@ -52,7 +84,7 @@ Build `f` such that
52#### Source
84#### Source
53
85
54```hoon
86```hoon
55−++ corl :: compose backwards
87+++ corl
56 |* [a=$-(* *) b=$-(* *)]
88 |* [a=$-(* *) b=$-(* *)]
57 =< +:|.((a (b))) :: type check
89 =< +:|.((a (b))) :: type check
58 =+ c=+<.b
90 =+ c=+<.b
@@ -88,10 +120,11 @@ A gate.
88#### Source
120#### Source
89
121
90```hoon
122```hoon
91− ++ curr
123+++ curr
92− |* [a=_|=(^ **) c=*}
124+ |* [a=$-(^ *) c=*]
93− |* b=_+<+.a
125+ =+ b=+<+.a
94− (a b c)
126+ |@ ++ $ (a b c)
127+ --
95```
128```
96
129
97#### Examples
130#### Examples
@@ -126,10 +159,11 @@ A gate.
126#### Source
159#### Source
127
160
128```hoon
161```hoon
129− ++ cury
162+++ cury
130− |* [a=_|=(^ **) b=*}
163+ |* [a=$-(^ *) b=*]
131− |* c=_+<+.a
164+ =+ c=+<+.a
132− (a b c)
165+ |@ ++ $ (a b c)
166+ --
133```
167```
134
168
135#### Examples
169#### Examples
@@ -145,74 +179,34 @@ A gate.
145
179
146---
180---
147
181
148−### `++hard`
182+### `++fore`
149
183
150−Force remold
184+Pair before
151
185
152−Demands that a specific type be produced, crashing the program if it is
186+`+fore` first takes gate `a`, producing a wet gate. The new wet gate then takes `b`, producing the pair of `[a b]`.
153−not.
154
187
155−#### Source
188+#### Accepts
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−```
179
189
180−---
190+`a` is a gate, and is the sample of `+fore`.
181
191
182−### `++soft`
192+`b` is a gate, and is the sample of `(fore a)`.
183
193
184−Maybe remold
194+#### Produces
185
195
186−Politely requests a specific type to be produced, producing null if it
196+`(pair a b)`.
187−is not.
188
197
189#### Source
198#### Source
190
199
191```hoon
200```hoon
192− ++ soft
201+++ fore |*(a=$-(* *) |*(b=$-(* *) (pair a b)))
193− |* han=gate
194− |= fud=* ^- (unit han)
195− =+ gol=(han fud)
196− ?.(=(gol fud) ~ [~ gol])
197```
202```
198
203
199#### Examples
204#### Examples
200
205
201```
206```
202− > ((soft %4) (add 2 2))
207+> =a (fore @ud)
203− [~ %4]
208+> `(a @t)`[42 'foo']
204−
209+[p=42 q='foo']
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− ~
216```
210```
217
211
218---
212---
@@ -229,25 +223,25 @@ A cell.
229
223
230#### Produces
224#### Produces
231
225
232−An atom.
226+A noun.
233
227
234#### Source
228#### Source
235
229
236```hoon
230```hoon
237− ++ head |*(^ ,:+<-)
231+++ head |*(^ ,:+<-)
238```
232```
239
233
240#### Examples
234#### Examples
241
235
242```
236```
243− > (head [1 2])
237+> (head [1 2])
244− 1
238+1
245
239
246− > (head [[1 1] 2])
240+> (head [[1 1] 2])
247− [1 1]
241+[1 1]
248
242
249− > (head "hello")
243+> (head "hello")
250− 'h'
244+'h'
251```
245```
252
246
253---
247---
@@ -269,93 +263,49 @@ A noun.
269#### Source
263#### Source
270
264
271```hoon
265```hoon
272− ++ same |*(* +<)
266+++ same |*(* +<)
273```
267```
274
268
275#### Examples
269#### Examples
276
270
277```
271```
278− > (same [1 2])
272+> (same [1 2])
279− [1 2]
273+[1 2]
280
274
281− > (same [[1 1] 2])
275+> (same [[1 1] 2])
282− [[1 1] 2]
276+[[1 1] 2]
283
277
284− > (same "hello")
278+> (same "hello")
285− "hello"
279+"hello"
286```
280```
287
281
288---
282---
289
283
290−### `++slog`
284+### `++succ`
291
285
292−Deify printf
286+Successor
293
287
294−Produces a stack trace if the stack trace isn't null, then produces the other
288+Increment an atom.
295−input.
296
289
297#### Accepts
290#### Accepts
298
291
299−A `tang`.
292+An `atom`.
300
293
301#### Produces
294#### Produces
302
295
303−A `tang`.
296+An `atom`.
304
297
305#### Source
298#### Source
306
299
307```hoon
300```hoon
308− ++ slog
301+++ succ |=(@ +(+<))
309− =| pri=@
310− |= a=tang ^+ same
311− ?~(a same ~>(%slog.[pri i.a] $(a t.a)))
312```
302```
313
303
314#### Examples
304#### Examples
315
305
316```
306```
317− > =+ result=((slog [%leaf "error-message"]~) [12 13]) [%product result]
307+> (succ 1)
318− [%product 12 13]
308+2
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
359```
309```
360
310
361---
311---
@@ -377,7 +327,7 @@ A noun.
377#### Source
327#### Source
378
328
379```hoon
329```hoon
380− ++ tail |*(^ ,:+<+)
330+++ tail |*(^ ,:+<+)
381```
331```
382
332
383#### Examples
333#### Examples
@@ -414,7 +364,7 @@ A flag.
414#### Source
364#### Source
415
365
416```hoon
366```hoon
417− ++ test |=(^ =(+<- +<+))
367+++ test |=(^ =(+<- +<+))
418```
368```
419
369
420#### Examples
370#### Examples
@@ -434,3 +384,67 @@ A flag.
434```
384```
435
385
436---
386---
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
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
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).
26<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrh' title="Add (halfprecision float)"><code>++add:rh</code></a>
26<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrh' title="Add (halfprecision float)"><code>++add:rh</code></a>
27<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrs' title="Add (singleprecision float)"><code>++add:rs</code></a>
27<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrs' title="Add (singleprecision float)"><code>++add:rs</code></a>
28<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrq' title="Add (quadprecision float)"><code>++add:rq</code></a>
28<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>
29<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#ag' title="Toplevel atom parser engine"><code>++ag</code></a>
30<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#ag' title="Toplevel atom parser engine"><code>++ag</code></a>
30<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#alf' title="Parse alphabetic characters"><code>++alf</code></a>
31<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#alf' title="Parse alphabetic characters"><code>++alf</code></a>
31<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#allby' title="Logical AND (map and wet gate)"><code>++all:by</code></a>
32<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).
38<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#apeag' title="Parse 0 or rule"><code>++ape:ag</code></a>
39<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#apeag' title="Parse 0 or rule"><code>++ape:ag</code></a>
39<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#aptby' title="Check correctness (map)"><code>++apt:by</code></a>
40<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#aptby' title="Check correctness (map)"><code>++apt:by</code></a>
40<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#aptin' title="Check correctness (set)"><code>++apt:in</code></a>
41<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>
41<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#at' title="(Undocumented)"><code>++at</code></a>
43<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#at' title="(Undocumented)"><code>++at</code></a>
42<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#aura' title="'Type' of atom"><code>++aura</code></a>
44<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#aura' title="'Type' of atom"><code>++aura</code></a>
43<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#axis' title="Nock axis"><code>++axis</code></a>
45<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).
214<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmarq' title="Fused multiplyadd (quadprecision float)"><code>++fma:rq</code></a>
216<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmarq' title="Fused multiplyadd (quadprecision float)"><code>++fma:rq</code></a>
215<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#fo' title="Modulo prime"><code>++fo</code></a>
217<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#fo' title="Modulo prime"><code>++fo</code></a>
216<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#foot' title="Cases of arms by variance model"><code>++foot</code></a>
218<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>
217<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fosrh' title="@rs to @rh"><code>++fos:rh</code></a>
220<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fosrh' title="@rs to @rh"><code>++fos:rh</code></a>
218<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frafo' title="Divide (modular base)"><code>++fra:fo</code></a>
221<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frafo' title="Divide (modular base)"><code>++fra:fo</code></a>
219<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frasi' title="Divide (signed integer)"><code>++fra:si</code></a>
222<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).
229<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#gar' title="Parse > (gar)"><code>++gar</code></a>
232<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#gar' title="Parse > (gar)"><code>++gar</code></a>
230<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gasby' title="Concatenate (map)"><code>++gas:by</code></a>
233<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gasby' title="Concatenate (map)"><code>++gas:by</code></a>
231<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#gasin' title="Concatenate (set)"><code>++gas:in</code></a>
234<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>
232<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#gasto' title="Push list into queue"><code>++gas:to</code></a>
236<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#gasto' title="Push list into queue"><code>++gas:to</code></a>
233<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#gate' title="Function"><code>++gate</code></a>
237<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#gate' title="Function"><code>++gate</code></a>
234<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#gaw' title="Classic whitespace"><code>++gaw</code></a>
238<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).
267### h
271### h
268
272
269<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>++hair</code></a>
273<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>
271<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#hasby' title="Key existence check (map)"><code>++has:by</code></a>
274<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#hasby' title="Key existence check (map)"><code>++has:by</code></a>
272<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#hasin' title="Key existence check (set)"><code>++has:in</code></a>
275<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#hasin' title="Key existence check (set)"><code>++has:in</code></a>
273<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
276<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).
324### l
327### l
325
328
326<a class="tooltip" href='/docs/hoon/reference/stdlib/4d/#last' title="Further trace"><code>++last</code></a>
329<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>
327<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#lenl' title="Construct list from nullterminated noun"><code>++le:nl</code></a>
332<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#lenl' title="Construct list from nullterminated noun"><code>++le:nl</code></a>
328<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#lent' title="List length"><code>++lent</code></a>
333<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#lent' title="List length"><code>++lent</code></a>
329<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#levy' title="Logical AND on list"><code>++levy</code></a>
334<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).
376<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#mate' title="Choose"><code>++mate</code></a>
381<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#mate' title="Choose"><code>++mate</code></a>
377<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#max' title="Maximum"><code>++max</code></a>
382<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#max' title="Maximum"><code>++max</code></a>
378<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#meff' title="Minimum exponent of ff"><code>++me:ff</code></a>
383<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>
380<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#mes' title="Parse hexabyte"><code>++mes</code></a>
385<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#mes' title="Parse hexabyte"><code>++mes</code></a>
381<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#mesc' title="Escape special characters"><code>++mesc</code></a>
386<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#mesc' title="Escape special characters"><code>++mesc</code></a>
382<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#met' title="Measure"><code>++met</code></a>
387<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).
615<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slav' title="Demand: parse cord with input aura"><code>++slav</code></a>
620<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slav' title="Demand: parse cord with input aura"><code>++slav</code></a>
616<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slaw' title="Parse cord to input aura"><code>++slaw</code></a>
621<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slaw' title="Parse cord to input aura"><code>++slaw</code></a>
617<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slay' title="Parse cord to coin"><code>++slay</code></a>
622<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>
619<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#slug' title="Use gate to parse delimited list"><code>++slug</code></a>
624<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#slug' title="Use gate to parse delimited list"><code>++slug</code></a>
620<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#smyt' title="Render path as tank"><code>++smyt</code></a>
625<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#smyt' title="Render path as tank"><code>++smyt</code></a>
621<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snag' title="Produce element at specific index (list)"><code>++snag</code></a>
626<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).
623<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snip' title="Drop tail off list"><code>++snip</code></a>
628<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snip' title="Drop tail off list"><code>++snip</code></a>
624<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snoc' title="Append noun to list"><code>++snoc</code></a>
629<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snoc' title="Append noun to list"><code>++snoc</code></a>
625<a class="tooltip" href='/docs/hoon/reference/stdlib/4l/#so' title="Coin parser engine"><code>++so</code></a>
630<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>
627<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#some' title="Wrap value in unit"><code>++some</code></a>
631<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#some' title="Wrap value in unit"><code>++some</code></a>
628<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#soq' title="Parse ' (soq)"><code>++soq</code></a>
632<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#soq' title="Parse ' (soq)"><code>++soq</code></a>
629<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#sort' title="Quicksort (list)"><code>++sort</code></a>
633<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).
661<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrh' title="Subtract from halfprecision float"><code>++sub:rh</code></a>
665<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrh' title="Subtract from halfprecision float"><code>++sub:rh</code></a>
662<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrs' title="Subtract from singleprecision float"><code>++sub:rs</code></a>
666<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrs' title="Subtract from singleprecision float"><code>++sub:rs</code></a>
663<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrq' title="Subtract from quadprecision float"><code>++sub:rq</code></a>
667<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>
664<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#sumfe' title="Sum two numbers in modular field"><code>++sum:fe</code></a>
669<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#sumfe' title="Sum two numbers in modular field"><code>++sum:fe</code></a>
665<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#sumfo' title="Modular sum"><code>++sum:fo</code></a>
670<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#sumfo' title="Modular sum"><code>++sum:fo</code></a>
666<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#sumsi' title="Addition (signed integer)"><code>++sum:si</code></a>
671<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).
1019
1024
1020<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#ju' title="Jug operations"><code>++ju</code></a>
1025<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#ju' title="Jug operations"><code>++ju</code></a>
1021<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#delju' title="Delete (jug)"><code>++del:ju</code></a>
1026<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>
1022<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#getju' title="Retrieve set"><code>++get:ju</code></a>
1028<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#getju' title="Retrieve set"><code>++get:ju</code></a>
1023<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
1029<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
1024<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#putju' title="Add keyset pair (jar)"><code>++put:ju</code></a>
1030<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).
1026### 2k: queue logic
1032### 2k: queue logic
1027
1033
1028<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#to' title="Queue operations"><code>++to</code></a>
1034<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>
1029<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#balto' title="Balance queue"><code>++bal:to</code></a>
1036<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#balto' title="Balance queue"><code>++bal:to</code></a>
1030<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#depto' title="Maximum depth (queue)"><code>++dep:to</code></a>
1037<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#depto' title="Maximum depth (queue)"><code>++dep:to</code></a>
1031<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#gasto' title="Push list into queue"><code>++gas:to</code></a>
1038<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).
1057
1064
1058### 2n: functional hacks
1065### 2n: functional hacks
1059
1066
1067+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#aftr' title="Pair after"><code>++aftr</code></a>
1060<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cork' title="Compose forward"><code>++cork</code></a>
1068<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cork' title="Compose forward"><code>++cork</code></a>
1061<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#corl' title="Compose backward"><code>++corl</code></a>
1069<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#corl' title="Compose backward"><code>++corl</code></a>
1062<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#curr' title="Rightcurry a gate"><code>++curr</code></a>
1070<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#curr' title="Rightcurry a gate"><code>++curr</code></a>
1063<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cury' title="Curry left a gate"><code>++cury</code></a>
1071<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>
1065<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#head' title="Get head of cell"><code>++head</code></a>
1073<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>
1067<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#same' title="Identity (produces same value)"><code>++same</code></a>
1074<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>
1075+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#succ' title="Successor"><code>++succ</code></a>
1069−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#soft' title="Maybe remold"><code>++soft</code></a>
1070<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#tail' title="Get tail of cell"><code>++tail</code></a>
1076<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#tail' title="Get tail of cell"><code>++tail</code></a>
1071<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#test' title="Test for equality"><code>++test</code></a>
1077<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>
1072
1080
1073### 2o: normalizing containers
1081### 2o: normalizing containers
1074
1082
@@ -1720,7 +1728,9 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
1720
1728
1721### 5c: compiler backend and prettyprinter
1729### 5c: compiler backend and prettyprinter
1722
1730
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>
1724
1734
1725### 5d: parser
1735### 5d: parser
1726
1736
lib/glossary.js+51−16
@@ -1472,6 +1472,13 @@ export const glossary = [
1472 slug: "https://urbit.org/docs/reference/library/3b/#addrq",
1472 slug: "https://urbit.org/docs/reference/library/3b/#addrq",
1473 desc: "Used in the Hoon standard library.",
1473 desc: "Used in the Hoon standard library.",
1474 },
1474 },
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+ },
1475 {
1482 {
1476 name: "Top-level atom parser engine",
1483 name: "Top-level atom parser engine",
1477 symbol: "ag",
1484 symbol: "ag",
@@ -1556,6 +1563,13 @@ export const glossary = [
1556 slug: "https://urbit.org/docs/reference/library/2h/#aptin",
1563 slug: "https://urbit.org/docs/reference/library/2h/#aptin",
1557 desc: "Used in the Hoon standard library.",
1564 desc: "Used in the Hoon standard library.",
1558 },
1565 },
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+ },
1559 {
1573 {
1560 name: "(Undocumented)",
1574 name: "(Undocumented)",
1561 symbol: "at",
1575 symbol: "at",
@@ -2697,6 +2711,13 @@ export const glossary = [
2697 slug: "https://urbit.org/docs/reference/library/4o/#foot",
2711 slug: "https://urbit.org/docs/reference/library/4o/#foot",
2698 desc: "Used in the Hoon standard library.",
2712 desc: "Used in the Hoon standard library.",
2699 },
2713 },
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+ },
2700 {
2721 {
2701 name: "@rs to @rh",
2722 name: "@rs to @rh",
2702 symbol: "fos:rh",
2723 symbol: "fos:rh",
@@ -2781,6 +2802,13 @@ export const glossary = [
2781 slug: "https://urbit.org/docs/reference/library/2h/#gasin",
2802 slug: "https://urbit.org/docs/reference/library/2h/#gasin",
2782 desc: "Used in the Hoon standard library.",
2803 desc: "Used in the Hoon standard library.",
2783 },
2804 },
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+ },
2784 {
2812 {
2785 name: "Push list into queue",
2813 name: "Push list into queue",
2786 symbol: "gas:to",
2814 symbol: "gas:to",
@@ -3026,13 +3054,6 @@ export const glossary = [
3026 slug: "https://urbit.org/docs/reference/library/3g/#hair",
3054 slug: "https://urbit.org/docs/reference/library/3g/#hair",
3027 desc: "Used in the Hoon standard library.",
3055 desc: "Used in the Hoon standard library.",
3028 },
3056 },
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− },
3036 {
3057 {
3037 name: "Key existence check (map)",
3058 name: "Key existence check (map)",
3038 symbol: "has:by",
3059 symbol: "has:by",
@@ -3348,6 +3369,13 @@ export const glossary = [
3348 slug: "https://urbit.org/docs/reference/library/4d/#last",
3369 slug: "https://urbit.org/docs/reference/library/4d/#last",
3349 desc: "Used in the Hoon standard library.",
3370 desc: "Used in the Hoon standard library.",
3350 },
3371 },
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+ },
3351 {
3379 {
3352 name: "Construct list from null-terminated noun",
3380 name: "Construct list from null-terminated noun",
3353 symbol: "le:nl",
3381 symbol: "le:nl",
@@ -3355,6 +3383,13 @@ export const glossary = [
3355 slug: "https://urbit.org/docs/reference/library/2m/#lenl",
3383 slug: "https://urbit.org/docs/reference/library/2m/#lenl",
3356 desc: "Used in the Hoon standard library.",
3384 desc: "Used in the Hoon standard library.",
3357 },
3385 },
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+ },
3358 {
3393 {
3359 name: "List length",
3394 name: "List length",
3360 symbol: "lent",
3395 symbol: "lent",
@@ -3695,7 +3730,7 @@ export const glossary = [
3695 name: "Crash and printf",
3730 name: "Crash and printf",
3696 symbol: "mean",
3731 symbol: "mean",
3697 usage: "stdlib",
3732 usage: "stdlib",
3698− slug: "https://urbit.org/docs/reference/library/2n/#mean",
3733+ slug: "https://urbit.org/docs/reference/library/5c/#mean",
3699 desc: "Used in the Hoon standard library.",
3734 desc: "Used in the Hoon standard library.",
3700 },
3735 },
3701 {
3736 {
@@ -5228,7 +5263,7 @@ export const glossary = [
5228 name: "Deify printf",
5263 name: "Deify printf",
5229 symbol: "slog",
5264 symbol: "slog",
5230 usage: "stdlib",
5265 usage: "stdlib",
5231− slug: "https://urbit.org/docs/reference/library/2n/#slog",
5266+ slug: "https://urbit.org/docs/reference/library/5c/#slog",
5232 desc: "Used in the Hoon standard library.",
5267 desc: "Used in the Hoon standard library.",
5233 },
5268 },
5234 {
5269 {
@@ -5280,13 +5315,6 @@ export const glossary = [
5280 slug: "https://urbit.org/docs/reference/library/4l/#so",
5315 slug: "https://urbit.org/docs/reference/library/4l/#so",
5281 desc: "Used in the Hoon standard library.",
5316 desc: "Used in the Hoon standard library.",
5282 },
5317 },
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− },
5290 {
5318 {
5291 name: "Wrap value in unit",
5319 name: "Wrap value in unit",
5292 symbol: "some",
5320 symbol: "some",
@@ -5546,6 +5574,13 @@ export const glossary = [
5546 slug: "https://urbit.org/docs/reference/library/3b/#subrq",
5574 slug: "https://urbit.org/docs/reference/library/3b/#subrq",
5547 desc: "Used in the Hoon standard library.",
5575 desc: "Used in the Hoon standard library.",
5548 },
5576 },
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+ },
5549 {
5584 {
5550 name: "Sum two numbers in modular field",
5585 name: "Sum two numbers in modular field",
5551 symbol: "sum:fe",
5586 symbol: "sum:fe",