on master help sign in
Merge pull request #1138 from tinnus-napbus/update-stdlib-1a-1b-1c-2a
380644ftinnus-napbus
content/docs/hoon/reference/stdlib/1a.md+390−271
@@ -23,40 +23,53 @@ An [`atom`](/docs/glossary/atom).
23#### Source
23#### Source
24
24
25```hoon
25```hoon
26− ++ add
26+++ add
27− ~/ %add
27+ ~/ %add
28− |= [a=@ b=@]
28+ |= [a=@ b=@]
29− ^- @
29+ ^- @
30− ?: =(0 a) b
30+ ?: =(0 a) b
31− $(a (dec a), b +(b))
31+ $(a (dec a), b +(b))
32```
32```
33
33
34#### Examples
34#### Examples
35
35
36```
36```
37− > (add 2 2)
37+> (add 2 2)
38− 4
38+4
39+```
39
40
41+```
40− > (add 1 1.000.000)
42+> (add 1 1.000.000)
41− 1.000.001
43+1.000.001
44+```
42
45
46+```
43− > (add 1.333 (mul 2 2))
47+> (add 1.333 (mul 2 2))
44− 1.337
48+1.337
49+```
45
50
51+```
46− > (add 'a' 4)
52+> (add 'a' 4)
47− 101
53+101
54+```
48
55
56+```
49− > (add 'a' 'b')
57+> (add 'a' 'b')
50− 195
58+195
59+```
51
60
61+```
52− > (add 0xc 0xf)
62+> (add 0xc 0xf)
53− 27
63+27
64+```
54
65
66+```
55− > `@ux`(add 0xc 0xf)
67+> `@ux`(add 0xc 0xf)
56− 0x1b
68+0x1b
57```
69```
58
70
59---
71---
72+
60### `++dec`
73### `++dec`
61
74
62Decrement
75Decrement
@@ -74,40 +87,46 @@ An [`atom`](/docs/glossary/atom).
74#### Source
87#### Source
75
88
76```hoon
89```hoon
77− ++ dec
90+++ dec
78− ~/ %dec
91+ ~/ %dec
79− |= a=@
92+ |= a=@
80− ~| %decrement-underflow
93+ ~_ leaf+"decrement-underflow"
81− ?< =(0 a)
94+ ?< =(0 a)
82− =+ b=0
95+ =+ b=0
83− |- ^- @
96+ |- ^- @
84− ?: =(a +(b)) b
97+ ?: =(a +(b)) b
85− $(b +(b))
98+ $(b +(b))
86```
99```
87
100
88#### Examples
101#### Examples
89
102
90```
103```
91− > (dec 7)
104+> (dec 7)
92− 6
105+6
93−
106+```
94− > (dec 0)
95− ! decrement-underflow
96− ! exit
97
107
108+```
98− > (dec 'b')
109+> (dec 0)
99− 97
110+! decrement-underflow
100− > `@t`(dec 'b')
111+! exit
101− 'a'
112+```
102
113
114+```
103− > (dec 0xc)
115+> (dec 'b')
104− 11
116+97
105− > `@ux`(dec 0xc)
117+> `@t`(dec 'b')
106− 0xb
118+'a'
107```
119```
108
120
121+```
122+> (dec 0xc)
123+11
124+> `@ux`(dec 0xc)
125+0xb
126+```
109
127
110---
128---
129+
111### `++div`
130### `++div`
112
131
113Divide
132Divide
@@ -127,42 +146,51 @@ An [`atom`](/docs/glossary/atom).
127#### Source
146#### Source
128
147
129```hoon
148```hoon
130− ++ div
149+++ div
131− ~/ %div
150+ ~/ %div
132− |: [a=`@`1 b=`@`1]
151+ |: [a=`@`1 b=`@`1]
133− ^- @
152+ ^- @
134− ~_ leaf+"divide-by-zero"
153+ ~_ leaf+"divide-by-zero"
135− ?< =(0 b)
154+ ?< =(0 b)
136− =+ c=0
155+ =+ c=0
137− |-
156+ |-
138− ?: (lth a b) c
157+ ?: (lth a b) c
139− $(a (sub a b), c +(c))
158+ $(a (sub a b), c +(c))
140```
159```
141
160
142#### Examples
161#### Examples
143
162
144```
163```
145− > (div 4 2)
164+> (div 4 2)
146− 2
165+2
166+```
147
167
168+```
148− > (div 17 8)
169+> (div 17 8)
149− 2
170+2
171+```
150
172
173+```
151− > (div 20 30)
174+> (div 20 30)
152− 0
175+0
176+```
153
177
178+```
154− > (div 'ab' 'a')
179+> (div 'ab' 'a')
155− 259
180+259
156− > `@`'ab'
181+> `@`'ab'
157− 25.185
182+25.185
158− > `@`a
183+> `@`a
159− 97
184+97
185+```
160
186
187+```
161− > (div 0x9f 0x29)
188+> (div 0x9f 0x29)
162− 6
189+6
163```
190```
164
191
165---
192---
193+
166### `++dvr`
194### `++dvr`
167
195
168Divide with remainder
196Divide with remainder
@@ -182,37 +210,46 @@ A cell of [`atoms`](/docs/glossary/atom).
182#### Source
210#### Source
183
211
184```hoon
212```hoon
185− ++ dvr
213+++ dvr
186− ~/ %dvr
214+ ~/ %dvr
187− |= [a=@ b=@]
215+ |= [a=@ b=@]
188− ^- [p=@ q=@]
216+ ^- [p=@ q=@]
189− [(div a b) (mod a b)]
217+ [(div a b) (mod a b)]
190```
218```
191
219
192#### Examples
220#### Examples
193
221
194```
222```
195− > (dvr 17 8)
223+> (dvr 17 8)
196− [p=2 q=1]
224+[p=2 q=1]
225+```
197
226
227+```
198− > (dvr 17 6)
228+> (dvr 17 6)
199− [p=2 q=5]
229+[p=2 q=5]
230+```
200
231
232+```
201− > (dvr 18 6)
233+> (dvr 18 6)
202− [p=3 q=0]
234+[p=3 q=0]
235+```
203
236
237+```
204− > (dvr 4 2)
238+> (dvr 4 2)
205− [p=2 q=0]
239+[p=2 q=0]
240+```
206
241
242+```
207− > (dvr 'ab 'a')
243+> (dvr 'ab 'a')
208− [p=259 q=62]
244+[p=259 q=62]
209− > `@`'a'
245+> `@`'a'
210− 97
246+97
211− > `@`'ab'
247+> `@`'ab'
212− 25.185
248+25.185
213```
249```
214
250
215---
251---
252+
216### `++gte`
253### `++gte`
217
254
218Greater-than/equal
255Greater-than/equal
@@ -232,27 +269,32 @@ A flag.
232#### Source
269#### Source
233
270
234```hoon
271```hoon
235− ++ gte
272+++ gte
236− ~/ %gte
273+ ~/ %gte
237− |= [a=@ b=@]
274+ |= [a=@ b=@]
238− ^- ?
275+ ^- ?
239− !(lth a b)
276+ !(lth a b)
240```
277```
241
278
242#### Examples
279#### Examples
243
280
244```
281```
245− > (gte 100 10)
282+> (gte 100 10)
246− %.y
283+%.y
284+```
247
285
286+```
248− > (gte 4 4)
287+> (gte 4 4)
249− %.y
288+%.y
289+```
250
290
291+```
251− > (gte 3 4)
292+> (gte 3 4)
252− %.n
293+%.n
253```
294```
254
295
255---
296---
297+
256### `++gth`
298### `++gth`
257
299
258Greater-than
300Greater-than
@@ -272,28 +314,32 @@ A flag.
272#### Source
314#### Source
273
315
274```hoon
316```hoon
275− ++ gth
317+++ gth
276− ~/ %gth
318+ ~/ %gth
277− |= [a=@ b=@]
319+ |= [a=@ b=@]
278− ^- ?
320+ ^- ?
279− !(lte a b)
321+ !(lte a b)
280```
322```
281
323
282−
283#### Examples
324#### Examples
284
325
285```
326```
286− > (gth 'd' 'c')
327+> (gth 'd' 'c')
287− %.y
328+%.y
329+```
288
330
331+```
289− > (gth ~h1 ~m61)
332+> (gth ~h1 ~m61)
290− %.n
333+%.n
334+```
291
335
336+```
292− > (gth 'steak' 'brisket')
337+> (gth 'steak' 'brisket')
293− %.n
338+%.n
294```
339```
295
340
296---
341---
342+
297### `++lte`
343### `++lte`
298
344
299Less-than/equal
345Less-than/equal
@@ -313,44 +359,55 @@ A flag.
313#### Source
359#### Source
314
360
315```hoon
361```hoon
316− ++ lte
362+++ lte
317− ~/ %lte
363+ ~/ %lte
318− |= [a=@ b=@]
364+ |= [a=@ b=@]
319− |(=(a b) (lth a b))
365+ |(=(a b) (lth a b))
320```
366```
321
367
322#### Examples
368#### Examples
323
369
324```
370```
325− > (lte 4 5)
371+> (lte 4 5)
326− %.y
372+%.y
327−
373+```
328− > (lte 5 4)
329− %.n
330−
331− > (lte 5 5)
332− %.y
333
374
375+```
334− > (lte 0 0)
376+> (lte 5 4)
335− %.y
377+%.n
378+```
336
379
380+```
381+> (lte 5 5)
382+%.y
383+```
337
384
385+```
338− > (lte 'a' 'b')
386+> (lte 0 0)
339− %.y
387+%.y
340− > `@`'a'
341− 97
342− > `@`'b'
388+```
343− 98
344
389
345− > (lte 'abraham' 'bob')
390+```
346− %.n
391+> (lte 'a' 'b')
392+%.y
393+> `@`'a'
394+97
395+> `@`'b'
396+98
397+```
347
398
348− > (lte ~m61 ~h1)
399+```
400+> (lte 'abraham' 'bob')
349− %.n
401+%.n
350```
402```
351
403
404+```
405+> (lte ~m61 ~h1)
406+%.n
407+```
352
408
353---
409---
410+
354### `++lth`
411### `++lth`
355
412
356Less-than
413Less-than
@@ -370,45 +427,56 @@ A flag.
370#### Source
427#### Source
371
428
372```hoon
429```hoon
373− ++ lth
430+++ lth
374− ~/ %lth
431+ ~/ %lth
375− |= [a=@ b=@]
432+ |= [a=@ b=@]
376− ^- ?
433+ ^- ?
377− ?& !=(a b)
434+ ?& !=(a b)
378− |-
435+ |-
379− ?| =(0 a)
436+ ?| =(0 a)
380− ?& !=(0 b)
437+ ?& !=(0 b)
381− $(a (dec a), b (dec b))
438+ $(a (dec a), b (dec b))
382− == == ==
439+ == == ==
383```
440```
384
441
385#### Examples
442#### Examples
386
443
387```
444```
388− > (lth 4 5)
445+> (lth 4 5)
389− %.y
446+%.y
447+```
390
448
449+```
391− > (lth 5 4)
450+> (lth 5 4)
392− %.n
451+%.n
452+```
393
453
454+```
394− > (lth 5 5)
455+> (lth 5 5)
395− %.n
456+%.n
457+```
396
458
459+```
397− > (lth 5 0)
460+> (lth 5 0)
398− %.n
461+%.n
462+```
399
463
464+```
400− > (lth 'a' 'b')
465+> (lth 'a' 'b')
401− %.y
466+%.y
402− > `@`'a'
467+> `@`'a'
403− 97
468+97
404− > `@`'b'
469+> `@`'b'
405− 98
470+98
471+```
406
472
473+```
407− > (lth 'abraham' 'bob')
474+> (lth 'abraham' 'bob')
408− %.n
475+%.n
409```
476```
410
477
411---
478---
479+
412### `++max`
480### `++max`
413
481
414Maximum
482Maximum
@@ -428,43 +496,58 @@ An [`atom`](/docs/glossary/atom).
428#### Source
496#### Source
429
497
430```hoon
498```hoon
431− ++ max
499+++ max
432− ~/ %max
500+ ~/ %max
433− |= [a=@ b=@]
501+ |= [a=@ b=@]
434− ^- @
502+ ^- @
435− ?: (gth a b) a
503+ ?: (gth a b) a
436− b
504+ b
437```
505```
438
506
439#### Examples
507#### Examples
440
508
441```
509```
442− > (max 10 100)
510+> (max 10 100)
443− 100
511+100
512+```
444
513
514+```
445− > (max 10.443 9)
515+> (max 10.443 9)
446− 10.443
516+10.443
517+```
447
518
519+```
448− > (max 1 1)
520+> (max 1 1)
449− 1
521+1
522+```
450
523
524+```
451− > (max 'abraham' 'bob')
525+> (max 'abraham' 'bob')
452− 30.787.873.400.840.801
526+30.787.873.400.840.801
527+```
453
528
529+```
454− > `@t`(max 'abraham' 'bob')
530+> `@t`(max 'abraham' 'bob')
455− 'abraham'
531+'abraham'
532+```
456
533
534+```
457− > `@t`(max 'abraham' 'benjamin')
535+> `@t`(max 'abraham' 'benjamin')
458− 'benjamin'
536+'benjamin'
537+```
459
538
539+```
460− > `@dr`(max ~m6 ~h1)
540+> `@dr`(max ~m6 ~h1)
461− ~h1
541+~h1
542+```
462
543
544+```
463− >`@ux`(max 0xe1 0x1e)
545+>`@ux`(max 0xe1 0x1e)
464− 0xe1
546+0xe1
465```
547```
466
548
467---
549---
550+
468### `++min`
551### `++min`
469
552
470Minimum
553Minimum
@@ -484,41 +567,53 @@ An [`atom`](/docs/glossary/atom).
484#### Source
567#### Source
485
568
486```hoon
569```hoon
487− ++ min
570+++ min
488− ~/ %min
571+ ~/ %min
489− |= [a=@ b=@]
572+ |= [a=@ b=@]
490− ^- @
573+ ^- @
491− ?: (lth a b) a
574+ ?: (lth a b) a
492− b
575+ b
493```
576```
494
577
495#### Examples
578#### Examples
496
579
497```
580```
498− > (min 10 100)
581+> (min 10 100)
499− 10
582+10
500−
583+```
501− > (min 10.443 9)
502− 9
503
584
585+```
504− > (min 1 1)
586+> (min 10.443 9)
505− 1
587+9
588+```
506
589
507− > (min 'abraham' 'bob')
590+```
508− 6.451.042
591+> (min 1 1)
592+1
593+```
509
594
595+```
510− > `@t`(min 'abraham' 'bob')
596+> (min 'abraham' 'bob')
511− 'bob'
597+6.451.042
598+```
512
599
600+```
513− > `@t`(min 'abraham' 'benjamin')
601+> `@t`(min 'abraham' 'bob')
514− 'abraham'
602+'bob'
603+```
515
604
516− > `@dr`(min ~m6 ~h1)
605+```
517− ~m6
606+> `@t`(min 'abraham' 'benjamin')
607+'abraham'
518```
608```
519
609
610+```
611+> `@dr`(min ~m6 ~h1)
612+~m6
613+```
520
614
521---
615---
616+
522### `++mod`
617### `++mod`
523
618
524Modulus
619Modulus
@@ -538,38 +633,47 @@ An [`atom`](/docs/glossary/atom).
538#### Source
633#### Source
539
634
540```hoon
635```hoon
541− ++ mod
636+++ mod
542− ~/ %mod
637+ ~/ %mod
543− |: [a=`@`1 b=`@`1]
638+ |: [a=`@`1 b=`@`1]
544− ^- @
639+ ^- @
545− ?< =(0 b)
640+ ?< =(0 b)
546− (sub a (mul b (div a b)))
641+ (sub a (mul b (div a b)))
547```
642```
548
643
549#### Examples
644#### Examples
550
645
551```
646```
552− > (mod 5 2)
647+> (mod 5 2)
553− 1
648+1
649+```
554
650
651+```
555− > (mod 5 5)
652+> (mod 5 5)
556− 0
653+0
654+```
557
655
656+```
558− > (mod 2 5)
657+> (mod 2 5)
559− 2
658+2
659+```
560
660
661+```
561− > (mod 40 20)
662+> (mod 40 20)
562− 0
663+0
664+```
563
665
666+```
564− > `@`'c'
667+> `@`'c'
565− 99
668+99
566− >`@`'a'
669+>`@`'a'
567− 97
670+97
568− > (mod 'c' 'a')
671+> (mod 'c' 'a')
569− 2
672+2
570```
673```
571
674
572---
675---
676+
573### `++mul`
677### `++mul`
574
678
575Multiply
679Multiply
@@ -589,38 +693,44 @@ An [`atom`](/docs/glossary/atom).
589#### Source
693#### Source
590
694
591```hoon
695```hoon
592− ++ mul
696+++ mul
593− ~/ %mul
697+ ~/ %mul
594− |: [a=`@`1 b=`@`1]
698+ |: [a=`@`1 b=`@`1]
595− ^- @
699+ ^- @
596− =+ c=0
700+ =+ c=0
597− |-
701+ |-
598− ?: =(0 a) c
702+ ?: =(0 a) c
599− $(a (dec a), c (add b c))
703+ $(a (dec a), c (add b c))
600```
704```
601
705
602#### Examples
706#### Examples
603
707
604```
708```
605− > (mul 3 4)
709+> (mul 3 4)
606− 12
710+12
607−
711+```
608− > (mul 0 1)
609− 0
610
712
611− > `@`'a'
713+```
612− 97
613− > `@`'b'
614− 98
615− > (mul 'a' 'b')
714+> (mul 0 1)
616− 9.506
715+0
716+```
617
717
618− >`@ux`(mul 0x1f 0xe)
718+```
619− 0x1b2
719+> `@`'a'
720+97
721+> `@`'b'
722+98
723+> (mul 'a' 'b')
724+9.506
620```
725```
621
726
727+```
728+>`@ux`(mul 0x1f 0xe)
729+0x1b2
730+```
622
731
623---
732---
733+
624### `++sub`
734### `++sub`
625
735
626Subtract
736Subtract
@@ -640,41 +750,50 @@ An [`atom`](/docs/glossary/atom).
640#### Source
750#### Source
641
751
642```hoon
752```hoon
643− ++ sub
753+++ sub
644− ~/ %sub
754+ ~/ %sub
645− |= [a=@ b=@]
755+ |= [a=@ b=@]
646− ~_ leaf+"subtract-underflow"
756+ ~_ leaf+"subtract-underflow"
647− ^- @
757+ ^- @
648− ?: =(0 b) a
758+ ?: =(0 b) a
649− $(a (dec a), b (dec b))
759+ $(a (dec a), b (dec b))
650```
760```
651
761
652−
653#### Examples
762#### Examples
654
763
655```
764```
656− > (sub 10 5)
765+> (sub 10 5)
657− 5
766+5
767+```
658
768
769+```
659− > (sub 243 44)
770+> (sub 243 44)
660− 199
771+199
772+```
661
773
774+```
662− > (sub 5 0)
775+> (sub 5 0)
663− 5
776+5
777+```
664
778
779+```
665− > (sub 0 5)
780+> (sub 0 5)
666− ! subtract-underflow
781+! subtract-underflow
667− ! exit
782+! exit
783+```
668
784
785+```
669− > (sub 'c' 'a')
786+> (sub 'c' 'a')
670− 2
787+2
671− > `@`'c'
788+> `@`'c'
672− 99
789+99
673− > `@`'a'
790+> `@`'a'
674− 97
791+97
792+```
675
793
794+```
676− > (sub 0x1f 0xe)
795+> (sub 0x1f 0xe)
677− 17
796+17
678− > `@ux`(sub 0x1f 0xe)
797+> `@ux`(sub 0x1f 0xe)
679− 0x11
798+0x11
680−```
799+```
content/docs/hoon/reference/stdlib/1b.md+122−86
@@ -15,7 +15,6 @@ Tests whether the tree address `a` is in the head or the tail of a [`noun`](/doc
15Produces the constant [`atom`](/docs/glossary/atom) `%2` if it is within the head (subtree `+2`), or
15Produces the constant [`atom`](/docs/glossary/atom) `%2` if it is within the head (subtree `+2`), or
16the constant [`atom`](/docs/glossary/atom) `%3` if it is within the tail (subtree `+3`).
16the constant [`atom`](/docs/glossary/atom) `%3` if it is within the tail (subtree `+3`).
17
17
18−
19#### Accepts
18#### Accepts
20
19
21`a` is an [`atom`](/docs/glossary/atom).
20`a` is an [`atom`](/docs/glossary/atom).
@@ -27,45 +26,56 @@ A constant [`atom`](/docs/glossary/atom).
27#### Source
26#### Source
28
27
29```hoon
28```hoon
30− ++ cap
29+++ cap
31− ~/ %cap
30+ ~/ %cap
32− |= a=@
31+ |= a=@
33− ^- ?($2 $3)
32+ ^- ?(%2 %3)
34− ?- a
33+ ?- a
35− $2 %2
34+ %2 %2
36− $3 %3
35+ %3 %3
37− ?(%0 %1) !!
36+ ?(%0 %1) !!
38− * $(a (div a 2))
37+ * $(a (div a 2))
39− ==
38+ ==
40```
39```
41
40
42#### Examples
41#### Examples
43
42
44```
43```
45− > (cap 4)
44+> (cap 4)
46− %2
45+%2
46+```
47
47
48+```
48− > (cap 6)
49+> (cap 6)
49− %3
50+%3
51+```
50
52
53+```
51− > (cap (add 10 9))
54+> (cap (add 10 9))
52− %2
55+%2
56+```
53
57
58+```
54− > (cap 1) ::address '1' is in neither the head nor the tail
59+> (cap 1) ::address '1' is in neither the head nor the tail
55− ! exit
60+! exit
61+```
56
62
63+```
57− > (cap 0x40))
64+> (cap 0x40))
58− %2
65+%2
59− > `@`0x40
66+> `@`0x40
60− 64
67+64
68+```
61
69
70+```
62− > (cap 'a')
71+> (cap 'a')
63− %3
72+%3
64− > `@`'a'
73+> `@`'a'
65− 97
74+97
66```
75```
67
76
68---
77---
78+
69### `++mas`
79### `++mas`
70
80
71Address within head/tail
81Address within head/tail
@@ -84,51 +94,66 @@ An [`atom`](/docs/glossary/atom).
84#### Source
94#### Source
85
95
86```hoon
96```hoon
87− ++ mas
97+++ mas
88− ~/ %mas
98+ ~/ %mas
89− |= a=@
99+ |= a=@
90− ^- @
100+ ^- @
91− ?- a
101+ ?- a
92− 1 !!
102+ ?(%2 %3) 1
93− 2 1
103+ ?(%0 %1) !!
94− 3 1
95− * (add (mod a 2) (mul $(a (div a 2)) 2))
104+ * (add (mod a 2) (mul $(a (div a 2)) 2))
96− ==
105+ ==
97```
106```
98
107
99#### Examples
108#### Examples
100
109
101```
110```
102− > (mas 3)
111+> (mas 3)
103− 1
112+1
113+```
104
114
115+```
105− > (mas 4)
116+> (mas 4)
106− 2
117+2
118+```
107
119
120+```
108− > (mas 5)
121+> (mas 5)
109− 3
122+3
110− > (cap 5) ::`(cap a)` computes whether address `a` is in the head or the tail
123+> (cap 5) ::`(cap a)` computes whether address `a` is in the head or the tail
111− %2
124+%2
125+```
112
126
127+```
113− > (mas 7)
128+> (mas 7)
114− 3
129+3
115− > (cap 7)
130+> (cap 7)
116− %3
131+%3
132+```
117
133
134+```
118− > (mas 11)
135+> (mas 11)
119− 7
136+7
137+```
120
138
139+```
121− > (mas (mas 11))
140+> (mas (mas 11))
122− 3
141+3
142+```
123
143
144+```
124− > (cap (mas 6))
145+> (cap (mas 6))
125− %3
146+%3
147+```
126
148
127− > (mas 0)
149+```
128− ! exit ::address `0` is in neither the head nor the tail
150+> (mas 0) ::address `0` is in neither the head nor the tail
151+! exit
152+```
129
153
130− > (mas 1)
154+```
131− ! exit ::address `1` is in neither the head nor the tail
155+> (mas 1) ::address `1` is in neither the head nor the tail
156+! exit
132```
157```
133
158
134#### Discussion
159#### Discussion
@@ -166,6 +191,7 @@ Notice how the old values in the head (subtree `+2`) were not illustrated in
166this case, because `+7` is within the tail (subtree `+3`).
191this case, because `+7` is within the tail (subtree `+3`).
167
192
168---
193---
194+
169### `++peg`
195### `++peg`
170
196
171Address within address
197Address within address
@@ -186,43 +212,54 @@ An [`atom`](/docs/glossary/atom).
186#### Source
212#### Source
187
213
188```hoon
214```hoon
189− ++ peg
215+++ peg
190− ~/ %peg
216+ ~/ %peg
191− |= [a=@ b=@]
217+ |= [a=@ b=@]
192− ?< =(0 a)
218+ ?< =(0 a)
193− ^- @
219+ ^- @
194− ?- b
220+ ?- b
195− $1 a
221+ %1 a
196− $2 (mul a 2)
222+ %2 (mul a 2)
197− $3 +((mul a 2))
223+ %3 +((mul a 2))
198− * (add (mod b 2) (mul $(b (div b 2)) 2))
224+ * (add (mod b 2) (mul $(b (div b 2)) 2))
199− ==
225+ ==
200```
226```
201
227
202#### Examples
228#### Examples
203
229
204```
230```
205− > (peg 4 1)
231+> (peg 4 1)
206− 4
232+4
207−
233+```
208− > (peg 1 4)
209− 4
210
234
235+```
211− > (peg 4 2)
236+> (peg 1 4)
212− 8
237+4
238+```
213
239
240+```
214− > (peg 4 8)
241+> (peg 4 2)
215− 32
242+8
243+```
216
244
245+```
217− > (peg 4 (4 2))
246+> (peg 4 8)
218− 32
247+32
248+```
219
249
250+```
220− > (peg 8 45)
251+> (peg 4 (4 2))
221− 269
252+32
253+```
222
254
223− > (cap (peg 4 2)) ::`(cap a)` computes whether address `a` is in the head or the tail
255+```
224− %2
256+> (peg 8 45)
257+269
258+```
225
259
260+```
261+> (cap (peg 4 2)) ::`(cap a)` computes whether address `a` is in the head or the tail
262+%2
226```
263```
227
264
228#### Discussion
265#### Discussion
@@ -269,5 +306,4 @@ Notice how relative address `+4` is at the same position as absolute address
269 (continues...)
306 (continues...)
270```
307```
271
308
272−
273---
309---
content/docs/hoon/reference/stdlib/1c.md+187−108
@@ -110,27 +110,34 @@ See the [bit arithmetic](/docs/hoon/reference/stdlib/2c) section for operations
110Mold of fork between two types
110Mold of fork between two types
111
111
112A mold generator. Produces a discriminated fork between two types, defaulting to
112A mold generator. Produces a discriminated fork between two types, defaulting to
113−`a`.
113+`this`.
114
114
115#### Source
115#### Source
116
116
117+```hoon
117− ++ each
118+++ each
118− |*([a=mold b=mold] $%([$| p=b] [$& p=a]))
119+ |$ [this that]
119−
120+ $% [%| p=that]
121+ [%& p=this]
122+ ==
123+```
120
124
121#### Examples
125#### Examples
122
126
123```
127```
124− > ? *(each cord time)
128+> ? *(each cord time)
125− ?({$.y p/@t} {$.n p/@da})
129+ ?([%.y p=@t] [%.n p=@da])
126− [%.y p='']
130+[%.y p='']
131+```
127
132
133+```
128− > ? *(each * tape)
134+> ? *(each * tape)
129− ?({$.y p/*} {$.n p/""})
135+ ?([%.y p=*] [%.n p=""])
130− [%.y p=0]
136+[%.y p=0]
131```
137```
132
138
133---
139---
140+
134### `++gate`
141### `++gate`
135
142
136Function
143Function
@@ -139,7 +146,6 @@ A [`core`](/docs/glossary/core) with one arm, `$`--the empty name--which transfo
139product noun. If used dryly as a type, the subject must have a sample type of
146product noun. If used dryly as a type, the subject must have a sample type of
140`*`.
147`*`.
141
148
142−
143#### Source
149#### Source
144
150
145```hoon
151```hoon
@@ -150,16 +156,23 @@ product noun. If used dryly as a type, the subject must have a sample type of
150#### Examples
156#### Examples
151
157
152```
158```
153− > ? gate
159+> ? gate
154− <1.rdl {* <31.ohr 1.jmk $143>}>
160+ <1.ddq [* <46.hgz 1.pnw %140>]>
155− <1.rdl {* <31.ohr 1.jmk $143>}>
161+<1.ddq [* <46.hgz 1.pnw %140>]>
162+```
156
163
164+```
157− > (`gate`|=(a=* [a 'b']) 1)
165+> (`gate`|=(a=* [a 'b']) 1)
158− [1 98]
166+[1 98]
167+```
159
168
169+```
160− > (`gate`|=(a=@ [a 'b']) 1)
170+> (`gate`|=(a=@ [a 'b']) 1)
171+mint-nice
172+-need.@
173+-have.*
161− ! nest-fail
174+nest-fail
162− ! exit
175+dojo: hoon expression failed
163```
176```
164
177
165#### Discussion
178#### Discussion
@@ -171,6 +184,7 @@ mathematical sense. Any `gate` normalizes to an iron `gate`.
171See also: [`++lift`](/docs/hoon/reference/stdlib/2a#lift), [`++cork`](/docs/hoon/reference/stdlib/2n#cork)
184See also: [`++lift`](/docs/hoon/reference/stdlib/2a#lift), [`++cork`](/docs/hoon/reference/stdlib/2n#cork)
172
185
173---
186---
187+
174### `++list`
188### `++list`
175
189
176List
190List
@@ -178,35 +192,42 @@ List
178A mold generator. Generates a mold of a null-terminated list of a
192A mold generator. Generates a mold of a null-terminated list of a
179homogenous type.
193homogenous type.
180
194
181−
182#### Source
195#### Source
183
196
184```hoon
197```hoon
185− ++ list
198+++ list
186− |*(a=mold $@($~ (lest a)))
199+ |$ [item]
200+ $@(~ [i=item t=(list item)])
187```
201```
188
202
189#### Examples
203#### Examples
190
204
191```
205```
192− > *(list)
206+> *(list)
193− ~
207+~
194−
208+```
195− > `(list @)`"abc"
196− ~[97 98 99]
197
209
210+```
198− > (snag 0 "abc")
211+> `(list @)`"abc"
199− 'a'
212+~[97 98 99]
213+```
200
214
201− > `(list @)`[1 2 'j' ~]
215+```
202− ~[1 2 106]
216+> (snag 0 "abc")
217+'a'
218+```
203
219
204```
220```
221+> `(list @)`[1 2 'j' ~]
222+~[1 2 106]
223+```
224+
205#### Discussion
225#### Discussion
206
226
207See also: [`++turn`](/docs/hoon/reference/stdlib/2b#turn), [`++snag`](/docs/hoon/reference/stdlib/2b#snag)
227See also: [`++turn`](/docs/hoon/reference/stdlib/2b#turn), [`++snag`](/docs/hoon/reference/stdlib/2b#snag)
208
228
209---
229---
230+
210### `++lone`
231### `++lone`
211
232
212Face on mold
233Face on mold
@@ -216,55 +237,67 @@ A mold generator. Puts face of `p` on the passed-in mold.
216#### Source
237#### Source
217
238
218```hoon
239```hoon
219− ++ lone
240+++ lone
220− |*(a=mold [p=a])
241+ |$ [item]
242+ p=item
221```
243```
222
244
223#### Examples
245#### Examples
224
246
225```
247```
226− > ? *cord
248+> ? *cord
227− @t
249+@t
228− ''
250+''
251+```
252+
253+```
229− > ? *(lone cord)
254+> ? *(lone cord)
230− p/@t
255+ p=@t
231− p=''
256+p=''
257+```
258+
259+```
260+> ? *(lone @)
261+ p=@
262+p=0
263+```
232
264
233− > ? *(lone @)
265+```
234− p/@
235− p=0
236− > ? *@
266+> ? *@
237− @
267+ @
238− 0
268+0
239```
269```
240
270
241---
271---
272+
242### `++pair`
273### `++pair`
243
274
244Mold of pair of types
275Mold of pair of types
245
276
246A mold generator. Produces a tuple of two of the types passed in.
277A mold generator. Produces a tuple of two of the types passed in.
247
278
248−
249#### Source
279#### Source
250
280
251```hoon
281```hoon
252− ++ pair
282+++ pair
253− |*([a=mold b=mold] [p=a q=b])
283+ |$ [head tail]
284+ [p=head q=tail]
254```
285```
255
286
256#### Examples
287#### Examples
257
288
258```
289```
259− > *(pair ? cord)
290+> *(pair ? cord)
260− [p=%.y q='']
291+[p=%.y q='']
261−
292+```
262− > *(pair tape @)
263− [p="" q=0]
264
293
294+```
295+> *(pair tape @)
296+[p="" q=0]
265```
297```
266
298
267---
299---
300+
268### `++pole`
301### `++pole`
269
302
270Faceless [`list`](/docs/hoon/reference/stdlib/1c#list)
303Faceless [`list`](/docs/hoon/reference/stdlib/1c#list)
@@ -274,23 +307,25 @@ A mold generator. A [`list`](/docs/hoon/reference/stdlib/1c#list) without the fa
274#### Source
307#### Source
275
308
276```hoon
309```hoon
277− ++ pole
310+++ pole
278− |*(a=mold $@($~ [a (pole a)]))
311+ |$ [item]
312+ $@(~ [item (pole item)])
279```
313```
280
314
281−
282#### Examples
315#### Examples
283
316
284```
317```
285− > =/(a "asdf" ?>(?=(^ a) `(lest @tD)`a))
318+> =/(a "asdf" ?>(?=(^ a) `(lest @tD)`a))
286− [i='a' t=[i='s' t=[i='d' t=[i='f' t=~]]]]
319+[i='a' t=[i='s' t=[i='d' t=[i='f' t=~]]]]
287−
288− > `(pole char)`"asdf"
289− ['a' ['s' ['d' ['f' ~]]]]
290```
320```
291
321
322+```
323+> `(pole char)`"asdf"
324+['a' ['s' ['d' ['f' ~]]]]
325+```
292
326
293---
327---
328+
294### `++qual`
329### `++qual`
295
330
296Mold of 4-type tuple
331Mold of 4-type tuple
@@ -300,43 +335,49 @@ A mold generator. Produces a tuple of four of the types passed in.
300#### Source
335#### Source
301
336
302```hoon
337```hoon
303− ++ qual
338+++ qual
304− |* [a=mold b=mold c=mold d=mold]
339+ |$ [first second third fourth]
305− [p=a q=b r=c s=d]
340+ [p=first q=second r=third s=fourth]
306```
341```
307
342
308#### Examples
343#### Examples
309
344
310```
345```
311− > *(qual date time tape cord)
346+> *(qual date time tape cord)
312− [p=[[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]] q=~292277024401-.1.1 r="" s='']
347+[p=[[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]] q=~2000.1.1 r="" s='']
348+```
313
349
350+```
314− > *(qual (list @) @u @ud @ux)
351+> *(qual (list @) @u @ud @ux)
315− [p=~ q=0 r=0 s=0x0]
352+[p=~ q=0 r=0 s=0x0]
316```
353```
317
354
318---
355---
356+
319### `++quip`
357### `++quip`
320
358
321Mold of pair of [`list`](/docs/hoon/reference/stdlib/1c#list) and type
359Mold of pair of [`list`](/docs/hoon/reference/stdlib/1c#list) and type
322
360
323−A mold generator. Produces a tuple of a [`list`](/docs/hoon/reference/stdlib/1c#list) of `a` and the mold of `b`.
361+A mold generator. Produces a tuple of a [`list`](/docs/hoon/reference/stdlib/1c#list) of `item` and the mold of `state`.
324
362
325#### Source
363#### Source
326
364
327```hoon
365```hoon
328− ++ quip
366+++ quip
329− |*([a=mold b=mold] [(list a) b])
367+ |$ [item state]
368+ [(list item) state]
330```
369```
331
370
332#### Examples
371#### Examples
333
372
334```
373```
335− > *(quip @ _'hi')
374+> *(quip @ _'hi')
336− [~ 'hi']
375+[~ 'hi']
376+```
337
377
378+```
338− > `(quip @ @ux)`[[1 2 3 4 ~] 0x10]
379+> `(quip @ @ux)`[[1 2 3 4 ~] 0x10]
339− [~[1 2 3 4] 0x10]
380+[~[1 2 3 4] 0x10]
340```
381```
341
382
342#### Discussion
383#### Discussion
@@ -345,6 +386,32 @@ A common pattern in Hoon code is to return a `list` of changes, along with a
345new state. You'll often see `quip` used in Gall apps.
386new state. You'll often see `quip` used in Gall apps.
346
387
347---
388---
389+
390+### `++step`
391+
392+Atom size or offset, in [bloq](#bloq)s.
393+
394+#### Source
395+
396+```
397+++ step
398+ _`@u`1
399+```
400+
401+#### Examples
402+
403+```
404+> `step`0
405+0
406+```
407+
408+```
409+> `step`2
410+2
411+```
412+
413+---
414+
348### `++trap`
415### `++trap`
349
416
350[`Core`](/docs/glossary/core) with one arm `$`
417[`Core`](/docs/glossary/core) with one arm `$`
@@ -354,25 +421,30 @@ A trap is a [`core`](/docs/glossary/core) with one arm `$`.
354#### Source
421#### Source
355
422
356```hoon
423```hoon
357− ++ trap
424+++ trap
358− |*(a=mold _|?(*a))
425+ |$ [product]
426+ _|?($:product)
359```
427```
360
428
361#### Examples
429#### Examples
362
430
363```
431```
364− > (*trap)
432+> (*trap)
365− <1?dxy 1.oeg {a/<1|rbb {* <31.ohr 1.jmk $143>}> <31.ohr 1.jmk $143>}>
433+<1?ruo 1.mhl [product=<1|xpg [* * *]> <46.hgz 1.pnw %140>]>
366−
434+```
367− > *(*trap)
368− 0
369
435
370− > (|.(42))
436+```
371− 42
437+> *(*trap)
438+0
372```
439```
373
440
441+```
442+> (|.(42))
443+42
444+```
374
445
375---
446---
447+
376### `++tree`
448### `++tree`
377
449
378Tree mold generator
450Tree mold generator
@@ -383,19 +455,20 @@ left/right sub `tree` of the same type. Pretty-printed with `{}`.
383#### Source
455#### Source
384
456
385```hoon
457```hoon
386− ++ tree
458+++ tree
459+ |$ [node]
387− |*(a=mold $@($~ [n=a l=(tree a) r=(tree a)]))
460+ $@(~ [n=node l=(tree node) r=(tree node)])
388```
461```
389
462
390#### Examples
463#### Examples
391
464
392```
465```
393− > `(tree [@ tape])`[[1 "hi"] [[2 "bye"] ~ ~] ~]
466+> `(tree [@ tape])`[[1 "hi"] [[2 "bye"] ~ ~] ~]
394− {[2 "bye"] [1 "hi"]}
467+{[2 "bye"] [1 "hi"]}
395```
468```
396
469
397−
398---
470---
471+
399### `++trel`
472### `++trel`
400
473
401Mold of three types
474Mold of three types
@@ -405,49 +478,55 @@ A mold generator. A mold of the tuple of the three types passed in.
405#### Source
478#### Source
406
479
407```hoon
480```hoon
408− ++ trel
481+++ trel
409− |*([a=mold b=mold c=mold] [p=a q=b r=c])
482+ |$ [first second third]
483+ [p=first q=second r=third]
410```
484```
411
485
412#### Examples
486#### Examples
413
487
414```
488```
415− > *(trel @ud @t @s)
489+> *(trel @ud @t @s)
416− [p=0 q='' r=--0]
490+[p=0 q='' r=--0]
491+```
417
492
493+```
418− > *(trel cord bloq tape)
494+> *(trel cord bloq tape)
419− [p='' q=0 r=""]
495+[p='' q=0 r=""]
420```
496```
421
497
422---
498---
499+
423### `++unit`
500### `++unit`
424
501
425Maybe
502Maybe
426
503
427−A mold generator. A `unit` is either `~` or `[~ u=a]`, where `a` is the
504+A mold generator. A `unit` is either `~` or `[~ u=item]`, where `item` is the
428type that was passed in.
505type that was passed in.
429
506
430−
431#### Source
507#### Source
432
508
433```hoon
509```hoon
434− ++ unit
510+++ unit
435− |*(a=mold $@($~ [$~ u=a]))
511+ |$ [item]
512+ $@(~ [~ u=item])
436```
513```
437
514
438#### Examples
515#### Examples
439
516
440```
517```
441− > ? *(unit time)
518+> ? *(unit time)
442− ?({$~ u/@da} $~)
519+ u(@da)
443− ~
520+~
521+```
444
522
523+```
445− > =a |= a=@
524+> =a |= a=@
446− ^- (unit @)
525+ ^- (unit @)
447− ?~ a ~
526+ ?~ a ~
448− [~ a]
527+ [~ a]
449− > (a 2)
528+> (a 2)
450− [~ u=2]
529+[~ 2]
451```
530```
452
531
453#### Discussion
532#### Discussion
content/docs/hoon/reference/stdlib/2a.md+287−120
@@ -24,24 +24,26 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit).
24#### Source
24#### Source
25
25
26```hoon
26```hoon
27− ++ biff
27+++ biff
28− |* [a=(unit) b=$-(* (unit))]
28+ |* [a=(unit) b=$-(* (unit))]
29− ?~ a ~
29+ ?~ a ~
30− (b u.a)
30+ (b u.a)
31```
31```
32
32
33#### Examples
33#### Examples
34
34
35```
35```
36− > (biff (some 5) |=(a=@ (some (add a 2))))
36+> (biff (some 5) |=(a=@ (some (add a 2))))
37− [~ u=7]
37+[~ u=7]
38−
39− > (biff ~ |=(a=@ (some (add a 2))))
40− ~
41```
38```
42
39
40+```
41+> (biff ~ |=(a=@ (some (add a 2))))
42+~
43+```
43
44
44---
45---
46+
45### `++bind`
47### `++bind`
46
48
47Non-unit function to [`unit`](/docs/hoon/reference/stdlib/1c#unit), producing [`unit`](/docs/hoon/reference/stdlib/1c#unit)
49Non-unit function to [`unit`](/docs/hoon/reference/stdlib/1c#unit), producing [`unit`](/docs/hoon/reference/stdlib/1c#unit)
@@ -63,26 +65,27 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit).
63#### Source
65#### Source
64
66
65```hoon
67```hoon
66− ++ bind
68+++ bind
67− |* [a=(unit) b=gate]
69+ |* [a=(unit) b=gate]
68− ?~ a ~
70+ ?~ a ~
69− [~ u=(b u.a)]
71+ [~ u=(b u.a)]
70```
72```
71
73
72−
73#### Examples
74#### Examples
74
75
75```
76```
76− > (bind ((unit @) [~ 97]) ,@t)
77+> (bind ((unit @) [~ 97]) ,@t)
77− [~ u='a']
78+[~ u='a']
78−
79− > =a |=(a=@ (add a 1))
80− > (bind ((unit @) [~ 2]) a)
81− [~ u=3]
82```
79```
83
80
81+```
82+> =a |=(a=@ (add a 1))
83+> (bind ((unit @) [~ 2]) a)
84+[~ u=3]
85+```
84
86
85---
87---
88+
86### `++bond`
89### `++bond`
87
90
88Replace null
91Replace null
@@ -103,11 +106,11 @@ Either the product of `a` or the value inside of [`unit`](/docs/hoon/reference/s
103#### Source
106#### Source
104
107
105```hoon
108```hoon
106− ++ bond
109+++ bond
107− |* a=(trap)
110+ |* a=(trap)
108− |* b=(unit)
111+ |* b=(unit)
109− ?~ b $:a
112+ ?~ b $:a
110− u.b
113+ u.b
111```
114```
112
115
113#### Examples
116#### Examples
@@ -117,13 +120,15 @@ Either the product of `a` or the value inside of [`unit`](/docs/hoon/reference/s
117 1.024
120 1.024
118 > ((bond |.((bex 10))) ~)
121 > ((bond |.((bex 10))) ~)
119 1.024
122 1.024
123+```
120
124
125+```
121 > ((bond |.((bex 10))) (slaw %ud '123'))
126 > ((bond |.((bex 10))) (slaw %ud '123'))
122 123
127 123
123```
128```
124
129
125−
126---
130---
131+
127### `++both`
132### `++both`
128
133
129Group [`unit`](/docs/hoon/reference/stdlib/1c#unit) values into pair
134Group [`unit`](/docs/hoon/reference/stdlib/1c#unit) values into pair
@@ -145,31 +150,36 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit) of the two initial values.
145#### Source
150#### Source
146
151
147```hoon
152```hoon
148− ++ both
153+++ both
149− |* [a=(unit) b=(unit)]
154+ |* [a=(unit) b=(unit)]
150− ?~ a ~
155+ ?~ a ~
151− ?~ b ~
156+ ?~ b ~
152− [~ u=[u.a u.b]]
157+ [~ u=[u.a u.b]]
153```
158```
154
159
155#### Examples
160#### Examples
156
161
157```
162```
158− > (both (some 1) (some %b))
163+> (both (some 1) (some %b))
159− [~ u=[1 %b]]
164+[~ u=[1 %b]]
165+```
160
166
167+```
161− > (both ~ (some %b))
168+> (both ~ (some %b))
162− ~
169+~
163```
170```
164
171
165---
172---
173+
166### `++clap`
174### `++clap`
167
175
168−Apply function to two [`units`](/docs/hoon/reference/stdlib/1c#unit)
176+Combine two [`units`](/docs/hoon/reference/stdlib/1c#unit) with function
169
177
170Applies a binary function `c`--which does not usually accept or produce a
178Applies a binary function `c`--which does not usually accept or produce a
171[`unit`](/docs/hoon/reference/stdlib/1c#unit)-- to the values of two [`units`](/docs/hoon/reference/stdlib/1c#unit), `a` and `b`, producing a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
179[`unit`](/docs/hoon/reference/stdlib/1c#unit)-- to the values of two [`units`](/docs/hoon/reference/stdlib/1c#unit), `a` and `b`, producing a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
172
180
181+If `a` is null, produces `b`. If `b` is null, produces `a`. Otherwise, produces the produce of `c` in a `unit`.
182+
173#### Accepts
183#### Accepts
174
184
175`a` is a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
185`a` is a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
@@ -185,31 +195,81 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit).
185#### Source
195#### Source
186
196
187```hoon
197```hoon
188− ++ clap :: combine
198+++ clap
189− |* [a=(unit) b=(unit) c=_|=(^ +<-)]
199+ |* [a=(unit) b=(unit) c=_=>(~ |=(^ +<-))]
190− ?~ a b
200+ ?~ a b
191− ?~ b a
201+ ?~ b a
192− [~ u=(c u.a u.b)]
202+ [~ u=(c u.a u.b)]
193```
203```
194
204
195#### Examples
205#### Examples
196
206
197```
207```
198− > =u ((unit @t) [~ 'a'])
208+> (clap ~ `'b' |=([a=@tD b=@tD] `tape`[a b ~]))
199− > =v ((unit @t) [~ 'b'])
209+[~ u='b']
200− > (clap u v |=([a=@t b=@t] (welp (trip a) (trip b))))
210+```
211+
212+```
213+> (clap `'a' ~ |=([a=@tD b=@tD] `tape`[a b ~]))
214+[~ u='a']
215+```
216+
217+```
218+> (clap `'a' `'b' |=([a=@tD b=@tD] `tape`[a b ~]))
201− [~ u="ab"]
219+[~ u="ab"]
220+```
221+
222+---
223+
224+### `++clef`
225+
226+Compose two [`units`](/docs/hoon/reference/stdlib/1c#unit) with function
227+
228+Applies a binary function `c`--which does not usually accept [`units`](/docs/hoon/reference/stdlib/1c#unit)-- to the values of two [`units`](/docs/hoon/reference/stdlib/1c#unit), `a` and `b`, producing a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
229+
230+If `a` or `b` are null, produces null. Otherwise, produces the produce of `c`.
231+
232+#### Accepts
233+
234+`a` is a `unit`.
235+
236+`b` is a `unit`.
237+
238+`c` is a `gate` that takes a `cell` and produces a `unit`.
239+
240+#### Produces
241+
242+A `unit`.
243+
244+#### Source
245+
246+```hoon
247+++ clef
248+ |* [a=(unit) b=(unit) c=_=>(~ |=(^ `+<-))]
249+ ?~ a ~
250+ ?~ b ~
251+ (c u.a u.b)
252+```
253+
254+#### Examples
202
255
203− > =a ((unit @u) [~ 1])
256+```
204− > =b ((unit @u) [~ 2])
257+> (clef ~ `'b' |=([a=@tD b=@tD] `(unit tape)`[~ [a b ~]]))
205− > =c |=([a=@ b=@] (add a b))
258+~
259+```
206
260
207− > (clap a b c)
261+```
208− [~ 3]
262+> (clef `'a' ~ |=([a=@tD b=@tD] `(unit tape)`[~ [a b ~]]))
263+~
209```
264```
210
265
266+```
267+> (clef `'a' `'b' |=([a=@tD b=@tD] `(unit tape)`[~ [a b ~]]))
268+[~ "ab"]
269+```
211
270
212---
271---
272+
213### `++drop`
273### `++drop`
214
274
215[`Unit`](/docs/hoon/reference/stdlib/1c#unit) to list
275[`Unit`](/docs/hoon/reference/stdlib/1c#unit) to list
@@ -227,26 +287,28 @@ A list.
227#### Source
287#### Source
228
288
229```hoon
289```hoon
230− ++ drop :: enlist
290+++ drop
231− |* a=(unit)
291+ |* a=(unit)
232− ?~ a ~
292+ ?~ a ~
233− [i=u.a t=~]
293+ [i=u.a t=~]
234```
294```
235
295
236#### Examples
296#### Examples
237
297
238```
298```
239− > =a ((unit @) [~ 97])
299+> =a ((unit @) [~ 97])
240− > (drop a)
300+> (drop a)
241− [i=97 t=~]
301+[i=97 t=~]
242−
243− > =a ((unit @) [~])
244− > (drop a)
245− ~
246```
302```
247
303
304+```
305+> =a ((unit @) [~])
306+> (drop a)
307+~
308+```
248
309
249---
310---
311+
250### `++fall`
312### `++fall`
251
313
252Give [`unit`](/docs/hoon/reference/stdlib/1c#unit) a default value
314Give [`unit`](/docs/hoon/reference/stdlib/1c#unit) a default value
@@ -266,32 +328,125 @@ Either a [`noun`](/docs/glossary/noun) `b` or the unwrapped value of [`unit`](/d
266#### Source
328#### Source
267
329
268```hoon
330```hoon
269− ++ fall :: default
331+++ fall
270− |* [a=(unit) b=*]
332+ |* [a=(unit) b=*]
271− ?~(a b u.a)
333+ ?~(a b u.a)
334+```
335+
336+#### Examples
337+
338+```
339+> (fall ~ 'a')
340+'a'
341+> (fall [~ u=0] 'a')
342+0
343+```
344+
345+---
346+
347+### `++flit`
348+
349+Make filter
350+
351+Accepts gate `a` which produces a `?`. Applies `a` to `b`, producing `b` wrapped in a `unit` if true, otherwise produces null.
352+
353+`+flit` is a wet gate that takes `a` and produces a new wet gate that takes `b`.
354+
355+#### Accepts
356+
357+`a` is a `gate` which produces `?`, and is the sample of the outer wet gate.
358+
359+`b` is any `noun`, and is the sample of the inner wet gate.
360+
361+#### Produces
362+
363+`(unit [type])`, where `[type]` is the type of `b`.
364+
365+#### Source
366+
367+```hoon
368+++ flit
369+ |* a=$-(* ?)
370+ |* b=*
371+ ?.((a b) ~ [~ u=b])
372+```
373+
374+#### Examples
375+
376+```
377+> =f (flit |=(=@ud ?:(=(ud 1) %.y %.n)))
378+> (f 1)
379+[~ 1]
380+> (f 2)
381+~
382+```
383+
384+---
385+
386+### `++hunt`
387+
388+First of units
389+
390+Apply binary gate `ord`, which produces a `?`, to units `a` and `b`. Produce `a` if true and `b` if false. If `a` is null, produce `b`. If `b` is null, produce `a`.
391+
392+This allows selecting between two units by some rule.
393+
394+#### Accepts
395+
396+`ord` is a `$-(^ ?)` - a binary gate that produces `?`.
397+
398+`a` is a `unit`.
399+
400+`b` is a `unit`.
401+
402+#### Produces
403+
404+A `unit`.
405+
406+#### Source
407+
408+```hoon
409+++ hunt
410+ |* [ord=$-(^ ?) a=(unit) b=(unit)]
411+ ^- %- unit
412+ $? _?>(?=(^ a) u.a)
413+ _?>(?=(^ b) u.b)
414+ ==
415+ ?~ a b
416+ ?~ b a
417+ ?:((ord u.a u.b) a b)
272```
418```
273
419
274#### Examples
420#### Examples
275
421
276```
422```
277− > (fall ~ 'a')
423+> (hunt gte ~ `20)
278− 'a'
424+[~ 20]
279− > (fall [~ u=0] 'a')
425+```
280− 0
426+
427+```
428+> (hunt gte `10 ~)
429+[~ 10]
430+```
431+
432+```
433+> (hunt gte `10 `20)
434+[~ 20]
281```
435```
282
436
283---
437---
438+
284### `++lift`
439### `++lift`
285
440
286Curried bind
441Curried bind
287
442
288−Accepts a `++gate` `a` and produces a function that accepts [`unit`](/docs/hoon/reference/stdlib/1c#unit)
443+Accepts function `a` and produces a function that accepts [`unit`](/docs/hoon/reference/stdlib/1c#unit)
289`b` to which it applies `a`. Used when you want a function that does not accept
444`b` to which it applies `a`. Used when you want a function that does not accept
290or produce a [`unit`](/docs/hoon/reference/stdlib/1c#unit) to both accept and produce a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
445or produce a [`unit`](/docs/hoon/reference/stdlib/1c#unit) to both accept and produce a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
291
446
292#### Accepts
447#### Accepts
293
448
294−`a` is a gate.
449+`a` is a `mold`.
295
450
296`b` is a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
451`b` is a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
297
452
@@ -302,24 +457,26 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit).
302#### Source
457#### Source
303
458
304```hoon
459```hoon
305− ++ lift :: lift gate (fmap)
460+++ lift
306− |* a=gate :: flipped
461+ |* a=mold
307− |* b=(unit) :: curried
462+ |* b=(unit)
308− (bind b a) :: bind
463+ (bind b a)
309```
464```
310
465
311#### Examples
466#### Examples
312
467
313```
468```
314− > ((lift dec) `(unit @)`~)
315− ~
316−
317− > ((lift dec) `(unit @)`[~ 20])
469+> ((lift dec) `(unit @)`~)
318− [~ 19]
470+~
319```
471```
320
472
473+```
474+> ((lift dec) `(unit @)`[~ 20])
475+[~ 19]
476+```
321
477
322---
478---
479+
323### `++mate`
480### `++mate`
324
481
325Choose
482Choose
@@ -343,35 +500,39 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit) or crash.
343#### Source
500#### Source
344
501
345```hoon
502```hoon
346− ++ mate :: choose
503+++ mate
347− |* [a=(unit) b=(unit)]
504+ |* [a=(unit) b=(unit)]
348− ?~ b a
505+ ?~ b a
349− ?~ a b
506+ ?~ a b
350− ?.(=(u.a u.b) ~|('mate' !!) a)
507+ ?.(=(u.a u.b) ~>(%mean.'mate' !!) a)
351```
508```
352
509
353#### Examples
510#### Examples
354
511
355```
512```
356− > =a ((unit @) [~ 97])
513+> =a ((unit @) [~ 97])
357− > =b ((unit @) [~ 97])
514+> =b ((unit @) [~ 97])
358− > (mate a b)
515+> (mate a b)
359− [~ 97]
360−
361− > =a ((unit @) [~ 97])
516+[~ 97]
362− > =b ((unit @) [~])
517+```
363− > (mate a b)
364− [~ 97]
365
518
519+```
366− > =a ((unit @) [~ 97])
520+> =a ((unit @) [~ 97])
367− > =b ((unit @) [~ 98])
521+> =b ((unit @) [~])
368− > (mate a b)
522+> (mate a b)
369− ! 'mate'
523+[~ 97]
370− ! exit
371```
524```
372
525
526+```
527+> =a ((unit @) [~ 97])
528+> =b ((unit @) [~ 98])
529+> (mate a b)
530+! 'mate'
531+! exit
532+```
373
533
374---
534---
535+
375### `++need`
536### `++need`
376
537
377Unwrap [`unit`](/docs/hoon/reference/stdlib/1c#unit)
538Unwrap [`unit`](/docs/hoon/reference/stdlib/1c#unit)
@@ -389,30 +550,35 @@ Either the unwrapped value of `a` (`u.a`), or crash.
389#### Source
550#### Source
390
551
391```hoon
552```hoon
392− ++ need :: demand
553+++ need
554+ ~/ %need
393− |* a=(unit)
555+ |* a=(unit)
394− ?~ a ~|(%need !!)
556+ ?~ a ~>(%mean.'need' !!)
395− u.a
557+ u.a
396```
558```
397
559
398#### Examples
560#### Examples
399
561
400```
562```
401− > =a ((unit [@t @t]) [~ ['a' 'b']])
563+> =a ((unit [@t @t]) [~ ['a' 'b']])
402− > (need a)
564+> (need a)
403− ['a' 'b']
565+['a' 'b']
404−
566+```
405− > =a ((unit @ud) [~ 17])
406− > (need a)
407− 17
408
567
568+```
409− > =a ((unit @) [~])
569+> =a ((unit @ud) [~ 17])
410− > (need a)
570+> (need a)
411− ! exit
571+17
412```
572```
413
573
574+```
575+> =a ((unit @) [~])
576+> (need a)
577+! exit
578+```
414
579
415---
580---
581+
416### `++some`
582### `++some`
417
583
418Wrap value in a [`unit`](/docs/hoon/reference/stdlib/1c#unit)
584Wrap value in a [`unit`](/docs/hoon/reference/stdlib/1c#unit)
@@ -430,20 +596,21 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit).
430#### Source
596#### Source
431
597
432```hoon
598```hoon
433− ++ some :: lift (pure)
599+++ some
434− |* a=*
600+ |* a=*
435− [~ u=a]
601+ [~ u=a]
436```
602```
437
603
438#### Examples
604#### Examples
439
605
440```
606```
441− > (some ['a' 'b'])
607+> (some ['a' 'b'])
442− [~ u=['a' 'b']]
608+[~ u=['a' 'b']]
443−
444− > (some &)
445− [~ u=%.y]
446```
609```
447
610
611+```
612+> (some &)
613+[~ u=%.y]
614+```
448
615
449---
616---
content/docs/hoon/reference/stdlib/table-of-contents.md+10−2
@@ -90,7 +90,8 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
90<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#char' title="Character"><code>++char</code></a>
90<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#char' title="Character"><code>++char</code></a>
91<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#chum' title="Jet hint information"><code>++chum</code></a>
91<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#chum' title="Jet hint information"><code>++chum</code></a>
92<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#cit' title="Octal digit"><code>++cit</code></a>
92<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#cit' title="Octal digit"><code>++cit</code></a>
93−<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clap' title="Apply function to two units"><code>++clap</code></a>
93+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clap' title="Combine two units with function"><code>++clap</code></a>
94+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clef' title="Compose two units with function"><code>++clef</code></a>
94<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#cmpsi' title="Compare (signed integer)"><code>++cmp:si</code></a>
95<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#cmpsi' title="Compare (signed integer)"><code>++cmp:si</code></a>
95<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#co' title="Literal rendering engine"><code>++co</code></a>
96<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#co' title="Literal rendering engine"><code>++co</code></a>
96<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#coil' title="Tuple of core information"><code>++coil</code></a>
97<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#coil' title="Tuple of core information"><code>++coil</code></a>
@@ -201,6 +202,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
201<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#find' title="First index in list"><code>++find</code></a>
202<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#find' title="First index in list"><code>++find</code></a>
202<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#fitre' title="Fit on one line test"><code>++fit:re</code></a>
203<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#fitre' title="Fit on one line test"><code>++fit:re</code></a>
203<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#flifl' title="Flip sign"><code>++fli:fl</code></a>
204<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#flifl' title="Flip sign"><code>++fli:fl</code></a>
205+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#flit' title="Make filter"><code>++flit</code></a>
204<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#flop' title="Reverse list"><code>++flop</code></a>
206<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#flop' title="Reverse list"><code>++flop</code></a>
205<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmaff' title="Fused multiplyadd (IEEE float)"><code>++fma:ff</code></a>
207<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmaff' title="Fused multiplyadd (IEEE float)"><code>++fma:ff</code></a>
206<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmafl' title="Fused multiplyadd"><code>++fma:fl</code></a>
208<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmafl' title="Fused multiplyadd"><code>++fma:fl</code></a>
@@ -281,6 +283,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
281<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#hor' title="Horizontal hash order"><code>++hor</code></a>
283<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#hor' title="Horizontal hash order"><code>++hor</code></a>
282<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#horyo' title="Seconds in hour"><code>++hor:yo</code></a>
284<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#horyo' title="Seconds in hour"><code>++hor:yo</code></a>
283<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#hufab' title="Parse two phonetic pairs"><code>++huf:ab</code></a>
285<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#hufab' title="Parse two phonetic pairs"><code>++huf:ab</code></a>
286+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#hunt' title="Select between two units by a rule"><code>++hunt</code></a>
284<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#hyfab' title="Parse 8 phonetic bytes"><code>++hyf:ab</code></a>
287<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#hyfab' title="Parse 8 phonetic bytes"><code>++hyf:ab</code></a>
285
288
286### i
289### i
@@ -643,6 +646,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
643<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#stab' title="Parse cord to path"><code>++stab</code></a>
646<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#stab' title="Parse cord to path"><code>++stab</code></a>
644<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stag' title="Add label"><code>++stag</code></a>
647<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stag' title="Add label"><code>++stag</code></a>
645<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#star' title="Produce list of matches"><code>++star</code></a>
648<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#star' title="Produce list of matches"><code>++star</code></a>
649+<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#step' title="Atom size or offset, in bloqs"><code>++step</code></a>
646<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stet' title="Add faces to rangeparser pairs in list"><code>++stet</code></a>
650<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stet' title="Add faces to rangeparser pairs in list"><code>++stet</code></a>
647<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stew' title="Switch by first"><code>++stew</code></a>
651<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stew' title="Switch by first"><code>++stew</code></a>
648<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stir' title="Parse repeatedly"><code>++stir</code></a>
652<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stir' title="Parse repeatedly"><code>++stir</code></a>
@@ -844,6 +848,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
844<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#pair' title="Mold of pair of types"><code>++pair</code></a>
848<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#pair' title="Mold of pair of types"><code>++pair</code></a>
845<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#pole' title="Mold generator of faceless list"><code>++pole</code></a>
849<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#pole' title="Mold generator of faceless list"><code>++pole</code></a>
846<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#quip' title="Mold generator (tuple of list and type)"><code>++quip</code></a>
850<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#quip' title="Mold generator (tuple of list and type)"><code>++quip</code></a>
851+<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#step' title="Atom size or offset, in bloqs"><code>++step</code></a>
847<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trap' title="Core with one arm $"><code>++trap</code></a>
852<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trap' title="Core with one arm $"><code>++trap</code></a>
848<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#tree' title="Mold generator (tree)"><code>++tree</code></a>
853<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#tree' title="Mold generator (tree)"><code>++tree</code></a>
849<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trel' title="Mold generator (tuple of three types)"><code>++trel</code></a>
854<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trel' title="Mold generator (tuple of three types)"><code>++trel</code></a>
@@ -855,9 +860,12 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
855<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#bind' title="Nonunit function to unit, producing unit"><code>++bind</code></a>
860<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#bind' title="Nonunit function to unit, producing unit"><code>++bind</code></a>
856<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#bond' title="Replace null"><code>++bond</code></a>
861<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#bond' title="Replace null"><code>++bond</code></a>
857<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#both' title="Group unit values into pair"><code>++both</code></a>
862<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#both' title="Group unit values into pair"><code>++both</code></a>
858−<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clap' title="Apply function to two units"><code>++clap</code></a>
863+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clap' title="Combine two units with function"><code>++clap</code></a>
864+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clef' title="Compose two units with function"><code>++clef</code></a>
859<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#drop' title="Unit to list"><code>++drop</code></a>
865<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#drop' title="Unit to list"><code>++drop</code></a>
860<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#fall' title="Give unit a default value"><code>++fall</code></a>
866<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#fall' title="Give unit a default value"><code>++fall</code></a>
867+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#flit' title="Make filter"><code>++flit</code></a>
868+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#hunt' title="Select between two units by a rule"><code>++hunt</code></a>
861<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#lift' title="Curried bind"><code>++lift</code></a>
869<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#lift' title="Curried bind"><code>++lift</code></a>
862<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#mate' title="Choose"><code>++mate</code></a>
870<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#mate' title="Choose"><code>++mate</code></a>
863<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#need' title="Unwrap unit"><code>++need</code></a>
871<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#need' title="Unwrap unit"><code>++need</code></a>
lib/glossary.js+29−1
@@ -1872,12 +1872,19 @@ export const glossary = [
1872 desc: "Used in the Hoon standard library.",
1872 desc: "Used in the Hoon standard library.",
1873 },
1873 },
1874 {
1874 {
1875− name: "Apply function to two units",
1875+ name: "Combine two units with function",
1876 symbol: "clap",
1876 symbol: "clap",
1877 usage: "stdlib",
1877 usage: "stdlib",
1878 slug: "https://urbit.org/docs/reference/library/2a/#clap",
1878 slug: "https://urbit.org/docs/reference/library/2a/#clap",
1879 desc: "Used in the Hoon standard library.",
1879 desc: "Used in the Hoon standard library.",
1880 },
1880 },
1881+ {
1882+ name: "Compose two units with function",
1883+ symbol: "clef",
1884+ usage: "stdlib",
1885+ slug: "https://urbit.org/docs/reference/library/2a/#clef",
1886+ desc: "Used in the Hoon standard library.",
1887+ },
1881 {
1888 {
1882 name: "Compare (signed integer)",
1889 name: "Compare (signed integer)",
1883 symbol: "cmp:si",
1890 symbol: "cmp:si",
@@ -2599,6 +2606,13 @@ export const glossary = [
2599 slug: "https://urbit.org/docs/reference/library/3b/#fli-fl",
2606 slug: "https://urbit.org/docs/reference/library/3b/#fli-fl",
2600 desc: "Used in the Hoon standard library.",
2607 desc: "Used in the Hoon standard library.",
2601 },
2608 },
2609+ {
2610+ name: "Make filter",
2611+ symbol: "flit",
2612+ usage: "stdlib",
2613+ slug: "https://urbit.org/docs/reference/library/2a/#flit",
2614+ desc: "Used in the Hoon standard library.",
2615+ },
2602 {
2616 {
2603 name: "Reverse list",
2617 name: "Reverse list",
2604 symbol: "flop",
2618 symbol: "flop",
@@ -3117,6 +3131,13 @@ export const glossary = [
3117 slug: "https://urbit.org/docs/reference/library/4j/#huf-ab",
3131 slug: "https://urbit.org/docs/reference/library/4j/#huf-ab",
3118 desc: "Used in the Hoon standard library.",
3132 desc: "Used in the Hoon standard library.",
3119 },
3133 },
3134+ {
3135+ name: "Select between two units by a rule",
3136+ symbol: "hunt",
3137+ usage: "stdlib",
3138+ slug: "https://urbit.org/docs/reference/library/2a/#hunt",
3139+ desc: "Used in the Hoon standard library.",
3140+ },
3120 {
3141 {
3121 name: "Parse 8 phonetic bytes",
3142 name: "Parse 8 phonetic bytes",
3122 symbol: "hyf:ab",
3143 symbol: "hyf:ab",
@@ -5399,6 +5420,13 @@ export const glossary = [
5399 slug: "https://urbit.org/docs/reference/library/4f/#star",
5420 slug: "https://urbit.org/docs/reference/library/4f/#star",
5400 desc: "Used in the Hoon standard library.",
5421 desc: "Used in the Hoon standard library.",
5401 },
5422 },
5423+ {
5424+ name: "Atom size or offset, in bloqs",
5425+ symbol: "step",
5426+ usage: "stdlib",
5427+ slug: "https://urbit.org/docs/reference/library/1c/#step",
5428+ desc: "Used in the Hoon standard library.",
5429+ },
5402 {
5430 {
5403 name: "Add faces to range-parser pairs in list",
5431 name: "Add faces to range-parser pairs in list",
5404 symbol: "stet",
5432 symbol: "stet",