on master help sign in
pre regex clean up
commit98321eff8ea32a9a91a958c5f4960a5fa26eac23 authorHenry Ault <henry@tlon.io> dateThu 24 Mar 2016, 12:16 (11 years ago) parent16d4dc4
37 files changed+2758−2889
docs/system/hoon/library/1a.md+43−46 docs/system/hoon/library/1b.md+30−31 docs/system/hoon/library/1c.md+64−52 docs/system/hoon/library/2a.md+59−49 docs/system/hoon/library/2b.md+108−75 docs/system/hoon/library/2c.md+50−46 docs/system/hoon/library/2d.md+16−15 docs/system/hoon/library/2e.md+12−20 docs/system/hoon/library/2f.md+19−13 docs/system/hoon/library/2g.md+1−1 docs/system/hoon/library/2h.md+75−66 docs/system/hoon/library/2i.md+99−87 docs/system/hoon/library/2j.md+35−185 docs/system/hoon/library/2k.md+40−36 docs/system/hoon/library/2n.md+37−31 docs/system/hoon/library/2o.md+27−25 docs/system/hoon/library/2p.md+16−15 docs/system/hoon/library/2q.md+34−59 docs/system/hoon/library/3a.md+99−97 docs/system/hoon/library/3c.md+286−279 docs/system/hoon/library/3d.md+75−154 docs/system/hoon/library/3e.md+13−67 docs/system/hoon/library/3f.md+84−73 docs/system/hoon/library/3g.md+39−24 docs/system/hoon/library/4a.md+55−52 docs/system/hoon/library/4b.md+259−256 docs/system/hoon/library/4c.md+135−147 docs/system/hoon/library/4d.md+8−8 docs/system/hoon/library/4e.md+51−48 docs/system/hoon/library/4f.md+147−127 docs/system/hoon/library/4g.md+14−11 docs/system/hoon/library/4j.md+71−70 docs/system/hoon/library/4k.md+273−347 docs/system/hoon/library/4l.md+195−76 docs/system/hoon/library/4m.md+60−54 docs/system/hoon/library/4n.md+109−126 docs/system/hoon/library/5f.md+20−21
docs/system/hoon/library/1a.md+43−46
@@ -8,7 +8,7 @@ Produces the sum of `a` and `b`.
88Accepts
99-------
1010
11−`a` is an [atom]().
11+`a` is an atom.
1212
1313`b` is an atom.
1414
@@ -22,7 +22,7 @@ Source
2222
2323 ++ add :: add
2424 ~/ %add
25− |= [a=@ b=@]
25+ |= [a/@ b/@]
2626 ^- @
2727 ?: =(0 a) b
2828 $(a (dec a), b +(b))
@@ -47,7 +47,7 @@ Decrements `a` by `1`.
4747Accepts
4848-------
4949
50−`a` is an [atom]().
50+`a` is an atom.
5151
5252Produces
5353--------
@@ -59,14 +59,13 @@ Source
5959
6060 ++ dec :: decrement
6161 ~/ %dec
62− |= a=@
62+ |= a/@
6363 ~| %decrement-underflow
6464 ?< =(0 a)
6565 =+ b=0
6666 |- ^- @
6767 ?: =(a +(b)) b
6868 $(b +(b))
69− ::
7069
7170Examples
7271--------
@@ -89,9 +88,9 @@ Computes `a` divided by `b`.
8988Accepts
9089-------
9190
92−`a` is an [atom]().
91+`a` is an atom.
9392
94−`b` is an [atom]().
93+`b` is an atom.
9594
9695Produces
9796--------
@@ -103,7 +102,7 @@ Source
103102
104103 ++ div :: divide
105104 ~/ %div
106− |= [a=@ b=@]
105+ |= [a/@ b/@]
107106 ^- @
108107 ~| 'div'
109108 ?< =(0 b)
@@ -134,7 +133,7 @@ Tests whether `a` is greater than a number `b`.
134133Accepts
135134-------
136135
137−`a` is an [atom]().
136+`a` is an atom.
138137
139138`b` is an atom.
140139
@@ -148,10 +147,10 @@ Source
148147
149148 ++ gte :: greater-equal
150149 ~/ %gte
151− |= [a=@ b=@]
150+ |= {a/@ b/@}
152151 ^- ?
153152 !(lth a b)
154− ::
153+
155154
156155Examples
157156--------
@@ -175,7 +174,7 @@ Tests whether `a` is greater than `b`.
175174Accepts
176175-------
177176
178−`a` is an [atom]().
177+`a` is an atom.
179178
180179`b` is an atom.
181180
@@ -189,10 +188,11 @@ Source
189188
190189 ++ gth :: greater-than
191190 ~/ %gth
192− |= [a=@ b=@]
191+ |= {a/@ b/@}
193192 ^- ?
194193 !(lte a b)
195− ::
194+
195+
196196
197197Examples
198198--------
@@ -214,7 +214,7 @@ Tests whether `a` is less than or equal to `b`.
214214Accepts
215215-------
216216
217−`a` is an [atom]().
217+`a` is an atom.
218218
219219`b` is an atom.
220220
@@ -228,8 +228,9 @@ Source
228228
229229 ++ lte :: less-equal
230230 ~/ %lte
231− |= [a=@ b=@]
231+ |= {a/@ b/@}
232232 |(=(a b) (lth a b))
233+
233234 ::
234235
235236Examples
@@ -256,7 +257,7 @@ Tests whether `a` is less than `b`.
256257Accepts
257258-------
258259
259−`a` is an [atom]().
260+`a` is an atom.
260261
261262`b` is an atom.
262263
@@ -270,15 +271,14 @@ Source
270271
271272 ++ lth :: less-than
272273 ~/ %lth
273− |= [a=@ b=@]
274+ |= {a/@ b/@}
274275 ^- ?
275− ?& !=(a b)
276− |-
277− ?| =(0 a)
278− ?& !=(0 b)
276+ ?& !=(a b)
277+ |-
278+ ?| =(0 a)
279+ ?& !=(0 b)
279280 $(a (dec a), b (dec b))
280281 == == ==
281− ::
282282
283283Examples
284284--------
@@ -303,7 +303,7 @@ Computes the greater of `a` and `b`.
303303Accepts
304304-------
305305
306−`a` is an [atom]().
306+`a` is an atom.
307307
308308`b` is an atom.
309309
@@ -317,11 +317,10 @@ Source
317317
318318 ++ max :: maximum
319319 ~/ %max
320− |= [a=@ b=@]
320+ |= {a/@ b/@}
321321 ^- @
322322 ?: (gth a b) a
323323 b
324− ::
325324
326325Examples
327326--------
@@ -345,7 +344,7 @@ Computes the lesser of `a` and `b`.
345344Accepts
346345-------
347346
348−`a` is an [atom]().
347+`a` is an atom.
349348
350349`b` is an atom.
351350
@@ -359,12 +358,11 @@ Source
359358
360359 ++ min :: minimum
361360 ~/ %min
362− |= [a=@ b=@]
361+ |= {a/@ b/@}
363362 ^- @
364363 ?: (lth a b) a
365364 b
366− ::
367−
365+
368366Examples
369367--------
370368
@@ -387,7 +385,7 @@ Computes the remainder of dividing `a` by `b`.
387385Accepts
388386-------
389387
390−`a` is an [atom]().
388+`a` is an atom.
391389
392390`b` is an atom.
393391
@@ -401,11 +399,11 @@ Source
401399
402400 ++ mod :: remainder
403401 ~/ %mod
404− |= [a=@ b=@]
402+ |: [a=`@`1 b=`@`1]
405403 ^- @
406404 ?< =(0 b)
407405 (sub a (mul b (div a b)))
408− ::
406+
409407
410408Examples
411409--------
@@ -427,7 +425,7 @@ Multiplies `a` by `b`.
427425Accepts
428426-------
429427
430−`a` is an [atom]().
428+`a` is an atom.
431429
432430`b` is an atom.
433431
@@ -441,14 +439,13 @@ Source
441439
442440 ++ mul :: multiply
443441 ~/ %mul
444− |= [a=@ b=@]
442+ |: [a=`@`1 b=`@`1]
445443 ^- @
446444 =+ c=0
447445 |-
448446 ?: =(0 a) c
449447 $(a (dec a), c (add b c))
450− ::
451−
448+
452449Examples
453450--------
454451
@@ -469,9 +466,9 @@ Subtracts `b` from `a`.
469466Accepts
470467-------
471468
472−`a` is an [atom]().
469+`a` is an atom.
473470
474−`b` is an [atom]().
471+`b` is an atom.
475472
476473Produces
477474--------
@@ -481,13 +478,13 @@ An atom.
481478Source
482479------
483480
484− ++ sub :: subtract
485− ~/ %sub
486− |= [a=@ b=@]
487− ~| %subtract-underflow
488− ^- @
489− ?: =(0 b) a
490− $(a (dec a), b (dec b))
481+ ++ sub :: subtract
482+ ~/ %sub
483+ |= [a/@ b/@]
484+ ~| %subtract-underflow
485+ ^- @
486+ ?: =(0 b) a
487+ $(a (dec a), b (dec b))
491488
492489Examples
493490--------
docs/system/hoon/library/1b.md+30−31
@@ -3,8 +3,8 @@
33
44Tree head
55
6−Tests whether an `a` is in the head or tail of a [noun](). Produces the
7−[cube]() `%2` if it is within the head, or the cube `%3` if it is
6+Tests whether an `a` is in the head or tail of a noun. Produces the
7+cube `%2` if it is within the head, or the cube `%3` if it is
88within the tail.
99
1010Accepts
@@ -15,22 +15,22 @@ Accepts
1515Produces
1616--------
1717
18−A [cube]().
18+A cube.
1919
2020Source
2121------
2222
23− ++ cap :: tree head
24− ~/ %cap
25− |= a=@
26− ^- ?(%2 %3)
27− ?- a
28− %2 %2
29− %3 %3
30− ?(%0 %1) !!
31− * $(a (div a 2))
32− ==
33− ::
23+ ++ cap :: tree head
24+ ~/ %cap
25+ |= a=@
26+ ^- ?(%2 %3)
27+ ?- a
28+ %2 %2
29+ %3 %3
30+ ?(%0 %1) !!
31+ * $(a (div a 2))
32+ ==
33+ ::
3434
3535Examples
3636--------
@@ -64,17 +64,17 @@ An atom.
6464Source
6565------
6666
67− ++ mas :: tree body
68− ~/ %mas
69− |= a=@
70− ^- @
71− ?- a
72− 1 !!
73− 2 1
74− 3 1
75− * (add (mod a 2) (mul $(a (div a 2)) 2))
76− ==
77− ::
67+ ++ mas :: tree body
68+ ~/ %mas
69+ |= a=@
70+ ^- @
71+ ?- a
72+ 1 !!
73+ 2 1
74+ 3 1
75+ * (add (mod a 2) (mul $(a (div a 2)) 2))
76+ ==
77+ ::
7878
7979Examples
8080--------
@@ -104,7 +104,7 @@ Computes the axis of `b` within axis `a`.
104104Accepts
105105-------
106106
107−`a` is an [atom]().
107+`a` is an atom.
108108
109109`b` is an atom.
110110
@@ -118,15 +118,14 @@ Source
118118
119119 ++ peg :: tree connect
120120 ~/ %peg
121− |= [a=@ b=@]
121+ |= {a/@ b/@}
122122 ^- @
123123 ?- b
124− 1 a
125− 2 (mul a 2)
126− 3 +((mul a 2))
124+ $1 a
125+ $2 (mul a 2)
126+ $3 +((mul a 2))
127127 * (add (mod b 2) (mul $(b (div b 2)) 2))
128128 ==
129− ::
130129
131130Examples
132131--------
docs/system/hoon/library/1c.md+64−52
@@ -5,11 +5,10 @@ Blocksize
55
66Atom representing a blocksize, by convention expressed as a power of 2.
77
8−
98Source
109------
1110
12− ++ bloq ,@ :: blockclass
11+ ++ bloq @ :: blockclass
1312
1413Examples
1514--------
@@ -25,21 +24,22 @@ Examples
2524
2625Mold of fork between two
2726
28−[mold]() generator: produces a dicriminated [fork]() between two types.
27+mold generator: produces a dicriminated fork between two types.
2928
3029Source
3130------
3231
33− ++ each |*([a=$+(* *) b=$+(* *)] $%([& p=a] [| p=b])) :: either a or b
32+ ++ each
33+ |* {a/$-(* *) b/$-(* *)} :: either a or b
34+ $%({$& p/a} {$| p/b}) :: a default
35+
3436
3537Examples
3638--------
3739
38− ~zod/try=> :type; *(each cord time)
40+ > ? *(each cord time)
41+ ?({$.y p/@t} {$.n p/@da})
3942 [%.y p='']
40− {[%.y p=@t] [%.n p=@da]}
41−
42−
4343
4444***
4545### `++gate`
@@ -47,28 +47,26 @@ Examples
4747Function
4848
4949A core with one arm, `$`--the empty name--which transforms a sample noun into a product
50−noun. If used [dryly]() as a type, the [subject]() must have a sample type of [`*`]().
50+noun. If used dryly as a type, the subject must have a sample type of `*`.
5151
5252
5353Source
5454------
5555
56− ++ gate $+(* *) :: general gate
56+ ++ gate $-(* *) :: general gate
57+
5758
5859Examples
5960--------
6061
61−See also: [`++lift`](), [`++cork`]()
62+See also: `++lift`, `++cork`
6263
63− ~zod/try=> *gate
64− <1|mws [* <101.jzo 1.ypj %164>]>
65− ~zod/try=> `gate`|=(* 0)
66− <1|mws [* <101.jzo 1.ypj %164>]>
64+ > ? gate
65+ <1.ybc {* <110.jyx 1.ztu $151>}>
66+ <1.ybc {* <110.jyx 1.ztu $151>}>
6767
68− ~zod/try=> (|=(a=* [a 'b']) 'c')
69− [99 'b']
70− ~zod/try=> (`gate`|=(a=* [a 'b']) 'c')
71− [99 98]
68+ > (`gate`|=(a/* [a 'b']) 1)
69+ [1 'b']
7270
7371
7472
@@ -77,55 +75,56 @@ See also: [`++lift`](), [`++cork`]()
7775
7876List
7977
80−[mold]() generator. `++list` generates a mold of a null-termanated list of a
78+mold generator. `++list` generates a mold of a null-termanated list of a
8179homogenous type.
8280
8381
8482Source
8583------
8684
87− ++ list |* a=_,* :: null-term list
85+ ++ list |* a/$-(* *) :: null-term list
86+ $@($~ {i/a t/(list a)}) ::
87+
8888
8989Examples
9090--------
9191
92−See also: [`++turn`](), [`++snag`]()
92+See also: `++turn`, `++snag`
9393
94− ~zod/try=> *(list)
94+ > *(list)
9595 ~
96− ~zod/try=> `(list ,@)`"abc"
96+ > `(list @)`"abc"
9797 ~[97 98 99]
98− ~zod/try=> (snag 0 "abc")
99− ~~a
98+ > (snag 0 "abc")
99+ 'a'
100100
101101
102102
103103***
104104### `++lone`
105105
106−Tile generator. `++lone` puts face of `p` on something.
106+`++lone` puts face of `p` on something.
107107
108108XX unused
109109
110110Source
111111------
112112
113− ++ lone |*(a=$+(* *) ,p=a) :: just one thing
114−
115−
113+ ++ lone |*(a/$-(* *) p/a) :: just one thing
116114
117115***
118116### `++pair`
119117
120118Mold of pair of types
121119
122−[mold]() generator. Produces a tuple of two of the types passed in.
120+mold generator. Produces a tuple of two of the types passed in.
123121
124122
125123Source
126124------
127125
128− ++ pair |*([a=$+(* *) b=$+(* *)] ,[p=a q=b]) :: just a pair
126+ ++ pair |*({a/$-(* *) b/$-(* *)} {p/a q/b}) :: just a pair
127+
129128
130129
131130Examples
@@ -141,12 +140,15 @@ Examples
141140
142141Faceless list
143142
144−A [`++list`]() without the [face]()s `i` and `t`.
143+A `++list` without the faces `i` and `t`.
145144
146145Source
147146------
148147
149− ++ pole |* a=_,* :: nameless list
148+ ++ pole |* a/$-(* *) :: nameless list
149+ $@($~ {a (pole a)}) ::
150+
151+
150152
151153Examples
152154--------
@@ -166,7 +168,8 @@ A `++qual` is a tuple of four of the types passed in.
166168Source
167169------
168170
169− ++ qual |* [a=$+(* *) b=$+(* *) c=$+(* *) d=$+(* *)] :: just a quadruple
171+ ++ qual |* {a/$-(* *) b/$-(* *) c/$-(* *) d/$-(* *)} :: just a quadruple
172+ {p/a q/b r/c s/d} ::
170173
171174Examples
172175--------
@@ -176,23 +179,22 @@ Examples
176179
177180
178181
179−***
182+ ***
180183### `++trap`
181184
182185Core with one arm `$`
183186
184−A trap is a core with one arm `++$`. Used when XX
187+A trap is a core with one arm `++$`.
185188
186189Source
187190------
188191
189− ++ trap ,_|.(_*) :: makes perfect sense
192+ ++ trap |*(a/_* _|?(*a)) :: makes perfect sense
193+
190194
191195Examples
192196--------
193197
194−See also: `|.`
195−
196198 ~zod/try=> *trap
197199 <1.mws 101.jzo 1.ypj %164>
198200 ~zod/try=> (*trap)
@@ -213,12 +215,14 @@ left/right sub `++tree` of the same type. Pretty-printed with `{}`.
213215Source
214216------
215217
216− ++ tree |* a=_,* :: binary tree
218+ ++ tree |* a/$-(* *) :: binary tree
219+ $@($~ {n/a l/(tree a) r/(tree a)}) ::
220+
217221
218222Examples
219223--------
220224
221− ~zod/try=> `(tree ,[@ tape])`[[1 "hi"] [[2 "bye"] ~ ~] ~]
225+ ~zod/try=> `(tree {@ tape})`[[1 "hi"] [[2 "bye"] ~ ~] ~]
222226 {[2 "bye"] [1 "hi"]}
223227
224228
@@ -228,17 +232,19 @@ Examples
228232
229233Mold of three types
230234
231−[`++mold`]() of the tuple of the three types passed in.
235+`++mold` of the tuple of the three types passed in.
232236
233237Source
234238------
235239
236− ++ trel |* [a=$+(* *) b=$+(* *) c=$+(* *)] :: just a triple
240+ ++ trel |* {a/$-(* *) b/$-(* *) c/$-(* *)} :: just a triple
241+ {p/a q/b r/c} ::
242+
237243
238244Examples
239245--------
240246
241− ~zod/try=> *(trel ,@ud ,@t ,@s)
247+ ~zod/try=> *(trel @ud @t @s)
242248 [p=0 q='' r=--0]
243249
244250
@@ -248,26 +254,32 @@ Examples
248254
249255Maybe
250256
251−[mold]() generator. A `++unit` is either `~` or `[~ u=a]` where `a` is the
257+mold generator. A `++unit` is either `~` or `[~ u=a]` where `a` is the
252258type that was passed in.
253259
254260
255261Source
256262------
257263
258− ++ unit |* a=_,* :: maybe
264+ ++ unit |* a/$-(* *) :: maybe
265+ $@($~ {$~ u/a}) ::
266+
259267
260268Examples
261269--------
262270
263−See also: [`++bind`]()
271+See also: `++bind`
264272
265− ~zod/try=> :type; *(unit time)
273+ ~zod/try=> ? *(unit time)
274+ ?({$~ u/@da} $~)
266275 ~
267− u(@da)
268− ~zod/try=> `(unit time)`[~ -<-]
269− [~ ~2014.9.24..19.25.10..7dd5]
270276
277+ ~zod/try=> > =a |= a/@
278+ ^- (unit @)
279+ ?~ a ~
280+ [~ a]
281+ > (a 2)
282+ [~ u=2]
271283
272284
273285***
docs/system/hoon/library/2a.md+59−49
@@ -3,7 +3,7 @@
33
44Unit as argument
55
6−Applies a function `b` that produces a unit to the unwrapped value of [++unit]()
6+Applies a function `b` that produces a unit to the unwrapped value of ++unit
77`a` (`u.a`). If `a` is empty, `~` is produced.
88
99Accepts
@@ -22,16 +22,17 @@ Source
2222------
2323
2424 ++ biff :: apply
25− |* [a=(unit) b=$+(* (unit))]
25+ |* {a/(unit) b/$-(* (unit))}
2626 ?~ a ~
2727 (b u.a)
2828
29+
2930Examples
3031--------
3132
32− ~zod/try=> (biff (some 5) |=(a=@ (some (add a 2))))
33+ ~zod/try=> (biff (some 5) |=(a/@ (some (add a 2))))
3334 [~ u=7]
34− ~zod/try=> (biff ~ |=(a=@ (some (add a 2))))
35+ ~zod/try=> (biff ~ |=(a/@ (some (add a 2))))
3536 ~
3637
3738
@@ -41,7 +42,7 @@ Examples
4142
4243Non-unit function to unit, producing unit
4344
44−Applies a function `b` to the value (`u.a`) of a [++unit]() `a`, producing
45+Applies a function `b` to the value (`u.a`) of a ++unit `a`, producing
4546a unit. Used when you want a function that does not accept or produce a
4647unit to both accept and produce a unit.
4748
@@ -61,17 +62,18 @@ Source
6162------
6263
6364 ++ bind :: argue
64− |* [a=(unit) b=gate]
65+ |* {a/(unit) b/gate}
6566 ?~ a ~
6667 [~ u=(b u.a)]
6768
69+
6870Examples
6971--------
7072
71− ~zod/try=> (bind ((unit ,@) [~ 97]) ,@t)
73+ ~zod/try=> (bind ((unit @) [~ 97]) ,@t)
7274 [~ `a`]
73− ~zod/try=> =a |=(a=@ (add a 1))
74− ~zod/try=> (bind ((unit ,@) [~ 2]) a)
75+ ~zod/try=> =a |=(a/@ (add a 1))
76+ ~zod/try=> (bind ((unit @) [~ 2]) a)
7577 [~ 3]
7678
7779
@@ -81,7 +83,7 @@ Examples
8183
8284Replace null
8385
84−Replaces an empty [++unit]() `b` with the product of a called [trap]()
86+Replaces an empty ++unit `b` with the product of a called trap
8587`a`. If the unit is not empty, then the original unit is produced.
8688
8789Accepts
@@ -100,11 +102,12 @@ Source
100102------
101103
102104 ++ bond :: replace
103− |* a=trap
104− |* b=(unit)
105+ |* a/(trap)
106+ |* b/(unit)
105107 ?~ b $:a
106108 u.b
107109
110+
108111Examples
109112--------
110113
@@ -123,7 +126,7 @@ Examples
123126Group unit values into pair
124127
125128Produces `~` if either `a` or `b` are empty. Otherwise, produces a
126−[++unit]() whose value is a cell of the values of two input units `a` and
129+++unit whose value is a cell of the values of two input units `a` and
127130`b`.
128131
129132Accepts
@@ -142,11 +145,12 @@ Source
142145------
143146
144147 ++ both :: all the above
145− |* [a=(unit) b=(unit)]
148+ |* {a/(unit) b/(unit)}
146149 ?~ a ~
147150 ?~ b ~
148151 [~ u=[u.a u.b]]
149152
153+
150154Examples
151155--------
152156
@@ -161,7 +165,7 @@ Examples
161165
162166Apply function to two units
163167
164−Applies a binary function `c`--which does not usually accept or produce a [`++unit`]()--
168+Applies a binary function `c`--which does not usually accept or produce a `++unit`--
165169to the values of two units, `a` and `b`, producing a unit.
166170
167171Accepts
@@ -182,20 +186,21 @@ Source
182186------
183187
184188 ++ clap :: combine
185− |* [a=(unit) b=(unit) c=_|=(^ +<-)]
189+ |* {a/(unit) b/(unit) c/_|=(^ +<-)}
186190 ?~ a b
187191 ?~ b a
188192 [~ u=(c u.a u.b)]
189193
194+
190195Examples
191196--------
192197
193− ~zod/try=> =u ((unit ,@t) [~ 'a'])
194− ~zod/try=> =v ((unit ,@t) [~ 'b'])
198+ ~zod/try=> =u ((unit @t) [~ 'a'])
199+ ~zod/try=> =v ((unit @t) [~ 'b'])
195200 ~zod/try=> (clap u v |=([a=@t b=@t] (welp (trip a) (trip b))))
196201 [~ u="ab"]
197− ~zod/try=> =a ((unit ,@u) [~ 1])
198− ~zod/try=> =b ((unit ,@u) [~ 2])
202+ ~zod/try=> =a ((unit @u) [~ 1])
203+ ~zod/try=> =b ((unit @u) [~ 2])
199204 ~zod/try=> =c |=([a=@ b=@] (add a b))
200205 ~zod/try=> (clap a b c)
201206 [~ 3]
@@ -207,7 +212,7 @@ Examples
207212
208213Unit to list
209214
210−Makes a [++list]() of the unwrapped value (`u.a`) of a [`++unit`]() `a`.
215+Makes a ++list of the unwrapped value (`u.a`) of a `++unit` `a`.
211216
212217Accepts
213218-------
@@ -223,17 +228,18 @@ Source
223228------
224229
225230 ++ drop :: enlist
226− |* a=(unit)
231+ |* a/(unit)
227232 ?~ a ~
228233 [i=u.a t=~]
229234
235+
230236Examples
231237--------
232238
233− ~zod/try=> =a ((unit ,@) [~ 97])
239+ ~zod/try=> =a ((unit @) [~ 97])
234240 ~zod/try=> (drop a)
235241 [i=97 t=~]
236− ~zod/try=> =a ((unit ,@) [~])
242+ ~zod/try=> =a ((unit @) [~])
237243 ~zod/try=> (drop a)
238244 ~
239245
@@ -244,14 +250,14 @@ Examples
244250
245251Give unit a default value
246252
247−Produces a default value `b` for a [`++unit`]() `a` in cases where `a` is null.
253+Produces a default value `b` for a `++unit` `a` in cases where `a` is null.
248254
249255Accepts
250256-------
251257
252258`a` is a unit.
253259
254−`b` is a [noun]() that's used as the default value.
260+`b` is a noun that's used as the default value.
255261
256262Produces
257263--------
@@ -262,9 +268,10 @@ Source
262268------
263269
264270 ++ fall :: default
265− |* [a=(unit) b=*]
271+ |* {a/(unit) b/*}
266272 ?~(a b u.a)
267273
274+
268275Examples
269276--------
270277
@@ -280,7 +287,7 @@ Examples
280287
281288Curried bind
282289
283−Accepts a [`++gate`]() `a` and produces a function that accepts [`++unit`]()
290+Accepts a `++gate` `a` and produces a function that accepts `++unit`
284291`b` to which it applies `a`. Used when you want a function that does not accept
285292or produce a unit to both accept and produce a unit.
286293
@@ -300,16 +307,17 @@ Source
300307------
301308
302309 ++ lift :: lift gate (fmap)
303− |* a=gate :: flipped
304− |* b=(unit) :: curried
310+ |* a/gate :: flipped
311+ |* b/(unit) :: curried
305312 (bind b a) :: bind
306313
314+
307315Examples
308316--------
309317
310− ~zod/try=> ((lift dec) `(unit ,@)`~)
318+ ~zod/try=> ((lift dec) `(unit @)`~)
311319 ~
312− ~zod/try=> ((lift dec) `(unit ,@)`[~ 20])
320+ ~zod/try=> ((lift dec) `(unit @)`[~ 20])
313321 [~ 19]
314322
315323
@@ -340,25 +348,26 @@ A unit or crash.
340348Source
341349------
342350
343−++ mate :: choose
344− |* [a=(unit) b=(unit)]
345− ?~ b a
346− ?~ a b
347− ?.(=(u.a u.b) ~|('mate' !!) a)
351+ ++ mate :: choose
352+ |* {a/(unit) b/(unit)}
353+ ?~ b a
354+ ?~ a b
355+ ?.(=(u.a u.b) ~|('mate' !!) a)
356+
348357
349358Examples
350359--------
351360
352− ~zod/try=> =a ((unit ,@) [~ 97])
353− ~zod/try=> =b ((unit ,@) [~ 97])
361+ ~zod/try=> =a ((unit @) [~ 97])
362+ ~zod/try=> =b ((unit @) [~ 97])
354363 ~zod/try=> (mate a b)
355364 [~ 97]
356− ~zod/try=> =a ((unit ,@) [~ 97])
357− ~zod/try=> =b ((unit ,@) [~])
365+ ~zod/try=> =a ((unit @) [~ 97])
366+ ~zod/try=> =b ((unit @) [~])
358367 ~zod/try=> (mate a b)
359368 [~ 97]
360− ~zod/try=> =a ((unit ,@) [~ 97])
361− ~zod/try=> =b ((unit ,@) [~ 98])
369+ ~zod/try=> =a ((unit @) [~ 97])
370+ ~zod/try=> =b ((unit @) [~ 98])
362371 ~zod/try=> (mate a b)
363372 ! 'mate'
364373 ! exit
@@ -370,7 +379,7 @@ Examples
370379
371380Unwrap unit
372381
373−Retrieve the value from a [`++unit`]() and crash if the unit is null.
382+Retrieve the value from a `++unit` and crash if the unit is null.
374383
375384Accepts
376385-------
@@ -386,20 +395,21 @@ Source
386395------
387396
388397 ++ need :: demand
389− |* a=(unit)
390− ?~ a !!
398+ |* a/(unit)
399+ ?~ a ~|(%need !!)
391400 u.a
392401
402+
393403Examples
394404--------
395405
396− ~zod/try=> =a ((unit ,[@t @t]) [~ ['a' 'b']])
406+ ~zod/try=> =a ((unit [@t @t]) [~ ['a' 'b']])
397407 ~zod/try=> (need a)
398408 ['a' 'b']
399− ~zod/try=> =a ((unit ,@ud) [~ 17])
409+ ~zod/try=> =a ((unit @ud) [~ 17])
400410 ~zod/try=> (need a)
401411 17
402− ~zod/try=> =a ((unit ,@) [~])
412+ ~zod/try=> =a ((unit @) [~])
403413 ~zod/try=> (need a)
404414 ! exit
405415
docs/system/hoon/library/2b.md+108−75
@@ -20,7 +20,7 @@ Source
2020
2121 ++ flop :: reverse
2222 ~/ %flop
23− |* a=(list)
23+ |* a/(list)
2424 => .(a (homo a))
2525 ^+ a
2626 =+ b=`_a`~
@@ -29,6 +29,7 @@ Source
2929 $(a t.a, b [i.a b])
3030
3131
32+
3233Examples
3334--------
3435
@@ -43,7 +44,7 @@ Examples
4344
4445Homogenize
4546
46−Produces a [`++list`]() whose type is a fork of all the contained types in the
47+Produces a `++list` whose type is a fork of all the contained types in the
4748list `a`. Used when you want to make all the types of the elements of a list the same.
4849
4950Accepts
@@ -60,12 +61,13 @@ Source
6061------
6162
6263 ++ homo :: homogenize
63− |* a=(list)
64+ |* a/(list)
6465 ^+ =< $
65− |% +- $ ?:(_? ~ [i=(snag 0 a) t=$])
66+ |% +- $ ?:(*? ~ [i=(snag 0 a) t=$])
6667 --
6768 a
6869
70+
6971Examples
7072--------
7173
@@ -86,7 +88,7 @@ Examples
8688
8789List length
8890
89−Produces the length of any [`++list`]() `a` as an atom.
91+Produces the length of any `++list` `a` as an atom.
9092
9193Accepts
9294-------
@@ -103,13 +105,14 @@ Source
103105
104106 ++ lent :: length
105107 ~/ %lent
106− |= a=(list)
108+ |= a/(list)
107109 ^- @
108110 =+ b=0
109111 |-
110− ?~ a b
112+ ?~ a b
111113 $(a t.a, b +(b))
112114
115+
113116Examples
114117--------
115118
@@ -125,7 +128,7 @@ Examples
125128
126129Logical "and" on list
127130
128−Computes the Boolean logical "and" on the results of [gate]() `b` applied to each individual element in [`++list`]() `a`.
131+Computes the Boolean logical "and" on the results of gate `b` applied to each individual element in `++list` `a`.
129132
130133Accepts
131134-------
@@ -137,24 +140,27 @@ Accepts
137140Produces
138141--------
139142
143+A boolean.
144+
140145Source
141146------
142147
143148 ++ levy
144149 ~/ %levy :: all of
145− |* [a=(list) b=_|=(p=* .?(p))]
150+ |* {a/(list) b/$-(* ?)}
146151 |- ^- ?
147152 ?~ a &
148153 ?. (b i.a) |
149154 $(a t.a)
150155
156+
151157Examples
152158--------
153159
154− ~zod/try=> =a |=(a=@ (lte a 1))
160+ ~zod/try=> =a |=(a/@ (lte a 1))
155161 ~zod/try=> (levy (limo [0 1 2 1 ~]) a)
156162 %.n
157− ~zod/try=> =a |=(a=@ (lte a 3))
163+ ~zod/try=> =a |=(a/@ (lte a 3))
158164 ~zod/try=> (levy (limo [0 1 2 1 ~]) a)
159165 %.y
160166
@@ -165,19 +171,28 @@ Examples
165171
166172Logical "or" on list
167173
174+Computes the Boolean logical "or" on the results of applying [gate]() `b` to every element of [`++list`]() `a`.
175+
176+Accepts
177+-------
178+
179+`a` is a list.
180+
181+`b` is a gate.
182+
183+Source
184+------
185+
168186 ++ lien :: some of
169187 ~/ %lien
170− |* [a=(list) b=$+(* ?)]
188+ |* {a/(list) b/$-(* ?)}
171189 |- ^- ?
172190 ?~ a |
173191 ?: (b i.a) &
174192 $(a t.a)
175−
176−Computes the Boolean logical "or" on the results of applying [gate]() `b` to every element of [`++list`]() `a`.
177−
178−`a` is a list.
179−
180−`b` is a gate.
193+
194+Examples
195+--------
181196
182197 ~zod/try=> =a |=(a=@ (gte a 1))
183198 ~zod/try=> (lien (limo [0 1 2 1 ~]) a)
@@ -203,7 +218,7 @@ Accepts
203218Produces
204219--------
205220
206−A list
221+A `++list`.
207222
208223Source
209224------
@@ -228,16 +243,16 @@ Examples
228243
229244Maybe transform
230245
231−Passes each member of [`++list`]() `a` to [gate]() `b`, which must produce a
232−[`++unit`](). Produces a new list with all the results that do not produce
246+Passes each member of `++list` `a` to gate `b`, which must produce a
247+`++unit`. Produces a new list with all the results that do not produce
233248`~`.
234249
235250Accepts
236251-------
237252
238−`a` is a [list]().
253+`a` is a list.
239254
240−`b` is a [gate]() that produces a [unit]().
255+`b` is a gate that produces a unit.
241256
242257Produces
243258--------
@@ -248,7 +263,8 @@ Source
248263------
249264
250265 ++ murn :: maybe transform
251− |* [a=(list) b=$+(* (unit))]
266+ ~/ %murn
267+ |* {a/(list) b/$-(* (unit))}
252268 |-
253269 ?~ a ~
254270 =+ c=(b i.a)
@@ -270,12 +286,12 @@ Examples
270286
271287Replicate
272288
273−Replicate: produces a [`++list`]() containing `a` copies of `b`.
289+Replicate: produces a `++list` containing `a` copies of `b`.
274290
275291Accepts
276292-------
277293
278−`b` is a [noun]()
294+`b` is a noun.
279295
280296Produces
281297--------
@@ -286,8 +302,9 @@ Source
286302------
287303
288304 ++ reap :: replicate
289− |* [a=@ b=*]
290− |- ^- (list ,_b)
305+ ~/ %reap
306+ |* {a/@ b/*}
307+ |- ^- (list _b)
291308 ?~ a ~
292309 [b $(a (dec a))]
293310
@@ -308,8 +325,8 @@ Examples
308325
309326Right fold
310327
311−Right fold: moves right to left across a [`++list`]() `a`, recursively slamming
312−a binary [gate]() `b` with an element from `a` and an accumulator, producing
328+Right fold: moves right to left across a `++list` `a`, recursively slamming
329+a binary gate `b` with an element from `a` and an accumulator, producing
313330the final value of the accumulator.
314331
315332Accepts
@@ -320,19 +337,20 @@ Accepts
320337Produces
321338--------
322339
323−The accumulator, which is a [noun]().
340+The accumulator, which is a noun.
324341
325342Source
326343------
327344
328− ++ reel :: right fold
345+ ++ reel :: right fold
329346 ~/ %reel
330− |* [a=(list) b=_|=([* *] +<+)]
347+ |* {a/(list) b/_|=({* *} +<+)}
331348 |- ^+ +<+.b
332349 ?~ a
333350 +<+.b
334351 (b i.a $(a t.a))
335352
353+
336354Examples
337355--------
338356
@@ -436,8 +454,8 @@ Examples
436454
437455Separate
438456
439−Separates a [`++list`]() `a` into two lists - Those elements of `a` who produce
440−true when slammed to [gate]() `b` and those who produce `%.n`.
457+Separates a `++list` `a` into two lists - Those elements of `a` who produce
458+true when slammed to gate `b` and those who produce `%.n`.
441459
442460Accepts
443461-------
@@ -453,17 +471,19 @@ Source
453471------
454472
455473 ++ skid :: separate
456− |* [a=(list) b=$+(* ?)]
474+ ~/ %skid
475+ |* {a/(list) b/$-(* ?)}
457476 |- ^+ [p=a q=a]
458477 ?~ a [~ ~]
459478 =+ c=$(a t.a)
460479 ?:((b i.a) [[i.a p.c] q.c] [p.c [i.a q.c]])
461480
462481
482+
463483Examples
464484--------
465485
466− ~zod/try=> =a |=(a=@ (gth a 1))
486+ ~zod/try=> =a |=(a/@ (gth a 1))
467487 ~zod/try=> (skid (limo [0 1 2 3 ~]) a)
468488 [p=[i=2 t=[i=3 t=~]] q=[i=0 t=[i=1 t=~]]]
469489
@@ -481,26 +501,29 @@ producing a list of all of the members that produce `%.y`. Inverse of
481501Accepts
482502-------
483503
484−`b` is a [gate]() that accepts one argument and produces a loobean.
504+`b` is a gate that accepts one argument and produces a boolean.
485505
486506Produces
487507--------
488508
509+A boolean
510+
489511Source
490512------
491513
492−++ skim :: only
493− ~/ %skim
494− |* [a=(list) b=_|=(p=* .?(p))]
495− |-
496− ^+ a`
497− ?~ a ~
498− ?:((b i.a) [i.a $(a t.a)] $(a t.a))
514+ ++ skim :: only
515+ ~/ %skim
516+ |* {a/(list) b/$-(* ?)}
517+ |-
518+ ^+ a
519+ ?~ a ~
520+ ?:((b i.a) [i.a $(a t.a)] $(a t.a))
521+
499522
500523Examples
501524--------
502525
503− ~zod/try=> =a |=(a=@ (gth a 1))
526+ ~zod/try=> =a |=(a/@ (gth a 1))
504527 ~zod/try=> (skim (limo [0 1 2 3 ~]) a)
505528 [i=2 t=[i=3 t=~]]
506529
@@ -511,14 +534,14 @@ Examples
511534
512535Except
513536
514−Cycles through the members of [`++list`]() `a`, passing them to a [gate]() `b`.
537+Cycles through the members of `++list` `a`, passing them to a gate `b`.
515538Produces a list of all of the members that produce `%.n`. Inverse of
516539`++skim`.
517540
518541Accepts
519542-------
520543
521−`b` is a [gate]() that accepts one argument and produces a loobean.
544+`b` is a gate that accepts one argument and produces a loobean.
522545
523546Produces
524547--------
@@ -530,16 +553,17 @@ Source
530553
531554 ++ skip :: except
532555 ~/ %skip
533− |* [a=(list) b=_|=(p=* .?(p))]
556+ |* {a/(list) b/$-(* ?)}
534557 |-
535558 ^+ a
536559 ?~ a ~
537560 ?:((b i.a) $(a t.a) [i.a $(a t.a)])
538561
562+
539563Examples
540564--------
541565
542− ~zod/try=> =a |=(a=@ (gth a 1))
566+ ~zod/try=> =a |=(a/@ (gth a 1))
543567 ~zod/try=> (skip (limo [0 1 2 3 ~]) a)
544568 [i=0 t=[i=1 t=~]]
545569
@@ -556,7 +580,7 @@ Accepts an atom `a` and list `b`, producing the remaining elements from
556580Accepts
557581-------
558582
559−`b` is a [list]().
583+`b` is a list.
560584
561585Produces
562586--------
@@ -568,12 +592,13 @@ Source
568592
569593 ++ slag :: suffix
570594 ~/ %slag
571− |* [a=@ b=(list)]
595+ |* {a/@ b/(list)}
572596 |- ^+ b
573597 ?: =(0 a) b
574598 ?~ b ~
575599 $(b t.b, a (dec a))
576600
601+
577602Examples
578603--------
579604
@@ -589,13 +614,13 @@ Examples
589614
590615Index
591616
592−Accepts an atom `a` and a [`++list`]() `b`, producing the element at the index
617+Accepts an atom `a` and a `++list` `b`, producing the element at the index
593618of `a`and failing if the list is null. Lists are 0-indexed.
594619
595620Accepts
596621-------
597622
598−`b` is a [list]().
623+`b` is a list.
599624
600625Produces
601626--------
@@ -607,13 +632,14 @@ Source
607632
608633 ++ snag :: index
609634 ~/ %snag
610− |* [a=@ b=(list)]
635+ |* {a/@ b/(list)}
611636 |-
612637 ?~ b
613638 ~|('snag-fail' !!)
614639 ?: =(0 a) i.b
615640 $(b t.b, a (dec a))
616641
642+
617643Examples
618644--------
619645
@@ -629,7 +655,7 @@ Examples
629655
630656Quicksort
631657
632−Quicksort: accepts a [`++list`]() `a` and a [gate]() `b` which accepts two nouns and
658+Quicksort: accepts a `++list` `a` and a gate `b` which accepts two nouns and
633659produces a loobean. `++sort` then produces a list of the elements of `a`,
634660sorted according to `b`.
635661
@@ -646,21 +672,22 @@ A list
646672Source
647673------
648674
649− ++ sort :: quicksort
675+ ++ sort !. :: quicksort
650676 ~/ %sort
651− |* [a=(list) b=$+([* *] ?)]
677+ |* {a/(list) b/$-([* *] ?)}
652678 => .(a ^.(homo a))
653679 |- ^+ a
654680 ?~ a ~
655681 %+ weld
656− $(a (skim t.a |=(c=_i.a (b c i.a))))
682+ $(a (skim t.a |=(c/_i.a (b c i.a))))
657683 ^+ t.a
658− [i.a $(a (skim t.a |=(c=_i.a !(b c i.a))))]
684+ [i.a $(a (skim t.a |=(c/_i.a !(b c i.a))))]
685+
659686
660687Examples
661688--------
662689
663− ~zod/try=> =a =|([p=@ q=@] |.((gth p q)))
690+ ~zod/try=> =a =|({p=@ q=@} |.((gth p q)))
664691 ~zod/try=> (sort (limo [0 1 2 3 ~]) a)
665692 ~[3 2 1 0]
666693
@@ -677,7 +704,7 @@ inclusive index `a`, producing `b` number of characters.
677704Accepts
678705-------
679706
680−`c` is a [list]().
707+`c` is a list.
681708
682709Produces
683710--------
@@ -688,8 +715,9 @@ Source
688715------
689716
690717 ++ swag :: infix
691− |* [[a=@ b=@] c=(list)]
692− (scag b (slag a c))
718+ |* {{a/@ b/@} c/(list)}
719+ (scag +<-> (slag +<-< c))
720+
693721
694722Examples
695723--------
@@ -706,7 +734,7 @@ Examples
706734
707735Gate to list
708736
709−Accepts a [`++list`]() `a` and a [gate]() `b`. Produces a list with the gate applied
737+Accepts a `++list` `a` and a gate `b`. Produces a list with the gate applied
710738to each element of the original list.
711739
712740Accepts
@@ -724,17 +752,18 @@ Source
724752
725753 ++ turn :: transform
726754 ~/ %turn
727− |* [a=(list) b=_,*]
755+ |* {a/(list) b/$-(* *)}
728756 |-
729757 ?~ a ~
730758 [i=(b i.a) t=$(a t.a)]
731759
760+
732761Examples
733762--------
734763
735764 ~zod/try=> (turn (limo [104 111 111 110 ~]) ,@t)
736765 <|h o o n|>
737− ~zod/try=> =a |=(a=@ (add a 4))
766+ ~zod/try=> =a |=(a/@ (add a 4))
738767 ~zod/try=> (turn (limo [1 2 3 4 ~]) a)
739768 ~[5 6 7 8]
740769
@@ -745,24 +774,25 @@ Examples
745774
746775Concatenate
747776
748−Concatenate two [`++list`]()s `a` and `b`.
777+Concatenate two `++list`s `a` and `b`.
749778
750779Accepts
751780-------
752781
753−`a` and `b` are [list]()s.
782+`a` and `b` are lists.
754783
755784Source
756785------
757786
758787 ++ weld :: concatenate
759788 ~/ %weld
760− |* [a=(list) b=(list)]
789+ |* {a/(list) b/(list)}
761790 => .(a ^.(homo a), b ^.(homo b))
762791 |- ^+ b
763792 ?~ a b
764793 [i.a $(a t.a)]
765794
795+
766796Examples
767797--------
768798
@@ -778,7 +808,7 @@ Examples
778808
779809Perfect weld
780810
781−Concatenate two [`++list`]()s `a` and `b` without losing their type information
811+Concatenate two `++list`s `a` and `b` without losing their type information
782812to homogenization.
783813
784814Accepts
@@ -797,7 +827,7 @@ Source
797827------
798828
799829 ++ welp :: perfect weld
800− =| [* *]
830+ =| {* *}
801831 |%
802832 +- $
803833 ?~ +<-
@@ -805,6 +835,7 @@ Source
805835 +<-(+ $(+<- +<->))
806836 --
807837
838+
808839Examples
809840--------
810841
@@ -812,10 +843,10 @@ Examples
812843 "foobar"
813844 ~zod/arvo=/hoon/hoon> (welp ~[60 61 62] ~[%a %b %c])
814845 [60 61 62 %a %b %c ~]
815− ~zod/arvo=/hoon/hoon> :type; (welp ~[60 61 62] ~[%a %b %c])
846+ ~zod/arvo=/hoon/hoon>? (welp ~[60 61 62] ~[%a %b %c])
816847 [60 61 62 %a %b %c ~]
817848 [@ud @ud @ud %a %b %c %~]
818− ~zod/arvo=/hoon/hoon> (welp [sa/1 so/2 ~] si/3)
849+ ~zod/arvo=/hoon/hoon> (welp [sa+1 so+2 ~] si/3)
819850 [[%sa 1] [%so 2] %si 3]
820851
821852
@@ -825,7 +856,7 @@ Examples
825856
826857Cons
827858
828−Turns a [`++list`]() of lists into a single list by promoting the elements of
859+Turns a `++list` of lists into a single list by promoting the elements of
829860each sublist into the higher.
830861
831862Accepts
@@ -850,6 +881,8 @@ Source
850881 (welp +<- $(+< +<+))
851882 --
852883
884+
885+
853886Examples
854887--------
855888
docs/system/hoon/library/2c.md+50−46
@@ -3,7 +3,7 @@
33
44Binary exponent
55
6−Computes the result of `2^a`, producing an [atom]().
6+Computes the result of `2^a`, producing an atom.
77
88Accepts
99-------
@@ -20,7 +20,7 @@ Source
2020
2121 ++ bex :: binary exponent
2222 ~/ %bex
23− |= a=@
23+ |= a/@
2424 ^- @
2525 ?: =(0 a) 1
2626 (mul 2 $(a (dec a)))
@@ -43,16 +43,16 @@ Examples
4343
4444Assemble
4545
46−Produces an [atom]() from a list `b` of length-value pairs `p` and `q`,
46+Produces an atom from a list `b` of length-value pairs `p` and `q`,
4747where `p` is the length in bloqs of size `a`, and `q` is an atomic
4848value.
4949
5050Accepts
5151-------
5252
53−`a` is a block size (see [`++bloq`]()).
53+`a` is a block size (see `++bloq`).
5454
55−`b` is a [`++list`]() of length value pairs, `p` and `q`.
55+`b` is a `++list` of length value pairs, `p` and `q`.
5656
5757Produces
5858--------
@@ -64,7 +64,7 @@ Source
6464
6565 ++ can :: assemble
6666 ~/ %can
67− |= [a=bloq b=(list ,[p=@ q=@])]
67+ |= [a/bloq b/(list [p=@ q=@])]
6868 ^- @
6969 ?~ b 0
7070 (mix (end a p.i.b q.i.b) (lsh a p.i.b $(b t.b)))
@@ -91,13 +91,13 @@ Examples
9191
9292Concatenate
9393
94−Concatenates two [atom]()s, `b` and `c`, according to bloq size `a`, producing an
94+Concatenates two atoms, `b` and `c`, according to bloq size `a`, producing an
9595atom.
9696
9797Accepts
9898-------
9999
100−`a` is a block size (see [`++bloq`]()).
100+`a` is a block size (see `++bloq`).
101101
102102`b` is an atom.
103103
@@ -113,9 +113,10 @@ Source
113113
114114 ++ cat :: concatenate
115115 ~/ %cat
116− |= [a=bloq b=@ c=@]
116+ |= {a/bloq b/@ c/@}
117117 (add (lsh a (met a b) c) b)
118118
119+
119120Examples
120121--------
121122
@@ -150,9 +151,9 @@ Slices `c` blocks of size `a` that are `b` blocks from the end of `d`.
150151Accepts
151152-------
152153
153−`a` is a block size (see [++bloq]()).
154+`a` is a block size (see ++bloq).
154155
155−`b` is an [atom]().
156+`b` is an atom.
156157
157158`c` is an atom.
158159
@@ -166,7 +167,7 @@ Source
166167
167168 ++ cut :: slice
168169 ~/ %cut
169− |= [a=bloq [b=@ c=@] d=@]
170+ |= {a/bloq {b/@u c/@u} d/@}
170171 (end a c (rsh a b d))
171172
172173Examples
@@ -196,16 +197,16 @@ Examples
196197
197198Tail
198199
199−Produces an [atom]() by taking the last `b` blocks of size `a` from `c`.
200+Produces an atom by taking the last `b` blocks of size `a` from `c`.
200201
201202Accepts
202203-------
203204
204−`a` is a block size (see [`++bloq`]()).
205+`a` is a block size (see `++bloq`).
205206
206207`b` is an atom.
207208
208−`c` is an [atom]().
209+`c` is an atom.
209210
210211Produces
211212--------
@@ -218,9 +219,10 @@ Source
218219
219220 ++ end :: tail
220221 ~/ %end
221− |= [a=bloq b=@ c=@]
222+ |= {a/bloq b/@u c/@}
222223 (mod c (bex (mul (bex a) b)))
223224
225+
224226Examples
225227--------
226228
@@ -248,16 +250,16 @@ Examples
248250
249251Fill bloqstream
250252
251−Produces an [atom]() by repeating `c` for `b` blocks of size `a`.
253+Produces an atom by repeating `c` for `b` blocks of size `a`.
252254
253255Accepts
254256-------
255257
256−`a` is a block size (see [`++bloq`]()).
258+`a` is a block size (see `++bloq`).
257259
258260`b` is an atom.
259261
260−`c` is an [atom]().
262+`c` is an atom.
261263
262264Produces
263265--------
@@ -268,7 +270,7 @@ Source
268270------
269271
270272 ++ fil :: fill bloqstream
271− |= [a=bloq b=@ c=@]
273+ |= {a/bloq b/@u c/@}
272274 =+ n=0
273275 =+ d=c
274276 |- ^- @
@@ -276,6 +278,7 @@ Source
276278 (rsh a 1 d)
277279 $(d (add c (lsh a 1 d)), n +(n))
278280
281+
279282Examples
280283--------
281284
@@ -295,12 +298,12 @@ Examples
295298
296299Left-shift
297300
298−Produces an [atom]() by left-shifting `c` by `b` blocks of size `a`.
301+Produces an atom by left-shifting `c` by `b` blocks of size `a`.
299302
300303Accepts
301304-------
302305
303−`a` is a block size (see [`++bloq`]()).
306+`a` is a block size (see `++bloq`).
304307
305308`b` is an atom.
306309
@@ -316,9 +319,10 @@ Source
316319
317320 ++ lsh :: left-shift
318321 ~/ %lsh
319− |= [a=bloq b=@ c=@]
322+ |= {a/bloq b/@u c/@}
320323 (mul (bex (mul (bex a) b)) c)
321324
325+
322326Examples
323327--------
324328
@@ -342,9 +346,9 @@ Examples
342346
343347Measure
344348
345−Computes the number of blocks of size `a` in `b`, producing an [atom]().
349+Computes the number of blocks of size `a` in `b`, producing an atom.
346350
347−`a` is a block size (see [`++bloq`]()).
351+`a` is a block size (see `++bloq`).
348352
349353`b` is an atom.
350354
@@ -353,7 +357,7 @@ Source
353357
354358 ++ met :: measure
355359 ~/ %met
356− |= [a=bloq b=@]
360+ |= {a/bloq b/@}
357361 ^- @
358362 =+ c=0
359363 |-
@@ -381,14 +385,14 @@ Examples
381385
382386Assemble non-zero
383387
384−Concatenates a list of [atom]()s `b` using blocksize `a`, producing an atom.
388+Concatenates a list of atoms `b` using blocksize `a`, producing an atom.
385389
386390Accepts
387391-------
388392
389−`a` is a block size (see [`++bloq`]()).
393+`a` is a block size (see `++bloq`).
390394
391−`b` is a [`++list`]() of [atom]()s.
395+`b` is a `++list` of atoms.
392396
393397Produces
394398--------
@@ -400,7 +404,7 @@ Source
400404
401405 ++ rap :: assemble nonzero
402406 ~/ %rap
403− |= [a=bloq b=(list ,@)]
407+ |= {a/bloq b/(list @)}
404408 ^- @
405409 ?~ b 0
406410 (cat a i.b $(b t.b))
@@ -424,12 +428,12 @@ Examples
424428
425429Assemble single
426430
427−Produces an [atom]() by assembling a list of atoms `b` using block size `a`.
431+Produces an atom by assembling a list of atoms `b` using block size `a`.
428432
429433Accepts
430434-------
431435
432−`a` is a block size (see [`++bloq`]()).
436+`a` is a block size (see `++bloq`).
433437
434438`b` is a list of atoms.
435439
@@ -443,7 +447,7 @@ Source
443447
444448 ++ rep :: assemble single
445449 ~/ %rep
446− |= [a=bloq b=(list ,@)]
450+ |= {a/bloq b/(list @)}
447451 ^- @
448452 =+ c=0
449453 |-
@@ -475,12 +479,12 @@ Examples
475479
476480Disassemble
477481
478−Produces a list of [atom]()s from the bits of `b` using block size `a`.
482+Produces a list of atoms from the bits of `b` using block size `a`.
479483
480484Accepts
481485-------
482486
483−`a` is a block size (see [`++bloq`]()).
487+`a` is a block size (see `++bloq`).
484488
485489`b` is an atom.
486490
@@ -494,8 +498,8 @@ Source
494498
495499 ++ rip :: disassemble
496500 ~/ %rip
497− |= [a=bloq b=@]
498− ^- (list ,@)
501+ |= {a/bloq b/@}
502+ ^- (list @)
499503 ?: =(0 b) ~
500504 [(end a 1 b) $(b (rsh a 1 b))]
501505
@@ -526,12 +530,12 @@ Examples
526530
527531Right-shift
528532
529−Right-shifts `c` by `b` blocks of size `a`, producing an [atom]().
533+Right-shifts `c` by `b` blocks of size `a`, producing an atom.
530534
531535Accepts
532536-------
533537
534−`a` is a block size (see [`++bloq`]()).
538+`a` is a block size (see `++bloq`).
535539
536540`b` is an atom.
537541
@@ -547,7 +551,7 @@ Source
547551
548552 ++ rsh :: right-shift
549553 ~/ %rsh
550− |= [a=bloq b=@ c=@]
554+ |= {a/bloq b/@u c/@}
551555 (div c (bex (mul (bex a) b)))
552556
553557Examples
@@ -583,14 +587,14 @@ Examples
583587
584588Reverse block order
585589
586−Switches little endian to big and vice versa: produces an [atom]() by
590+Switches little endian to big and vice versa: produces an atom by
587591reversing the block order of `b` using block size `a`.
588592
589593
590594Accepts
591595-------
592596
593−`a` is a block size (see [`++bloq`]()).
597+`a` is a block size (see `++bloq`).
594598
595599`b` is an atom.
596600
@@ -602,7 +606,7 @@ An atom
602606Source
603607------
604608
605− ++ swap |=([a=bloq b=@] (rep a (flop (rip a b)))) :: reverse bloq order
609+ ++ swap |=({a/bloq b/@} (rep a (flop (rip a b)))) :: reverse bloq order
606610
607611Examples
608612--------
@@ -625,7 +629,7 @@ Examples
625629
626630Binary logarithm
627631
628−Computes the base-2 logarithm of `a`, producing an [atom]().
632+Computes the base-2 logarithm of `a`, producing an atom.
629633
630634Accepts
631635-------
@@ -641,8 +645,8 @@ Source
641645------
642646
643647 ++ xeb :: binary logarithm
644− :: ~/ %xeb
645− |= a=@
648+ ~/ %xeb
649+ |= a/@
646650 ^- @
647651 (met 0 a)
648652
docs/system/hoon/library/2d.md+16−15
@@ -23,7 +23,7 @@ Source
2323
2424 ++ con :: binary or
2525 ~/ %con
26− |= [a=@ b=@]
26+ |= {a/@ b/@}
2727 =+ [c=0 d=0]
2828 |- ^- @
2929 ?: ?&(=(0 a) =(0 b)) d
@@ -31,9 +31,9 @@ Source
3131 a (rsh 0 1 a)
3232 b (rsh 0 1 b)
3333 c +(c)
34− d %+ add d
35− %^ lsh 0 c
36− ?& =(0 (end 0 1 a))
34+ d %+ add d
35+ %^ lsh 0 c
36+ ?& =(0 (end 0 1 a))
3737 =(0 (end 0 1 b))
3838 ==
3939 ==
@@ -61,7 +61,7 @@ Examples
6161
6262Binary AND
6363
64−Computes the bit-wise logical AND of two [atom]()s `a` and `b`, producing an
64+Computes the bit-wise logical AND of two atoms `a` and `b`, producing an
6565atom.
6666
6767Accepts
@@ -81,17 +81,17 @@ Source
8181
8282 ++ dis :: binary and
8383 ~/ %dis
84− |= [a=@ b=@]
85− =| [c=@ d=@]
84+ |= {a/@ b/@}
85+ =| {c/@ d/@}
8686 |- ^- @
8787 ?: ?|(=(0 a) =(0 b)) d
8888 %= $
8989 a (rsh 0 1 a)
9090 b (rsh 0 1 b)
9191 c +(c)
92− d %+ add d
93− %^ lsh 0 c
94− ?| =(0 (end 0 1 a))
92+ d %+ add d
93+ %^ lsh 0 c
94+ ?| =(0 (end 0 1 a))
9595 =(0 (end 0 1 b))
9696 ==
9797 ==
@@ -123,7 +123,7 @@ Examples
123123
124124Binary XOR
125125
126−Produces the bit-wise logical XOR of `a` and `b`, producing an [atom]().
126+Produces the bit-wise logical XOR of `a` and `b`, producing an atom.
127127
128128Accepts
129129-------
@@ -142,7 +142,7 @@ Source
142142
143143 ++ mix :: binary xor
144144 ~/ %mix
145− |= [a=@ b=@]
145+ |= {a/@ b/@}
146146 ^- @
147147 =+ [c=0 d=0]
148148 |-
@@ -183,9 +183,9 @@ of `c`.
183183Accepts
184184-------
185185
186−`a` is a block size (see [`++bloq`]()).
186+`a` is a block size (see `++bloq`).
187187
188−`b` is an [atom]().
188+`b` is an atom.
189189
190190`c` is an atom.
191191
@@ -197,9 +197,10 @@ An atom.
197197Source
198198------
199199
200− ++ not |= [a=bloq b=@ c=@] :: binary not (sized)
200+ ++ not |= {a/bloq b/@ c/@} :: binary not (sized)
201201 (mix c (dec (bex (mul b (bex a)))))
202202
203+
203204Examples
204205--------
205206
docs/system/hoon/library/2e.md+12−20
@@ -3,7 +3,7 @@
33
44Hashes an atom with the 32-bit FNV non-cryptographic hash algorithm.
55Multiplies `a` by the prime number 16,777,619 and then takes the block
6−of size 5 off the product's end, producing an [atom]().
6+of size 5 off the product's end, producing an atom.
77
88Accepts
99-------
@@ -19,7 +19,7 @@ An atom.
1919Source
2020------
2121
22− ++ fnv |=(a=@ (end 5 1 (mul 16.777.619 a))) :: FNV scrambler
22+ ++ fnv |=(a/@ (end 5 1 (mul 16.777.619 a))) :: FNV scrambler
2323
2424Examples
2525--------
@@ -37,12 +37,12 @@ Examples
3737### `++mug`
3838
3939Hashes `a` with the 31-bit nonzero FNV-1a non-cryptographic hash
40−algorithm, producing an [atom]().
40+algorithm, producing an atom.
4141
4242Accepts
4343-------
4444
45−A is a [noun]().
45+A is a noun.
4646
4747Produces
4848--------
@@ -54,7 +54,7 @@ Source
5454
5555 ++ mug :: 31bit nonzero FNV1a
5656 ~/ %mug
57− |= a=*
57+ |= a/*
5858 ?^ a
5959 =+ b=[p=$(a -.a) q=$(a +.a)]
6060 |- ^- @
@@ -73,6 +73,7 @@ Source
7373 ^$(b +(b))
7474 $(c (fnv (mix c (cut 3 [d 1] a))), d +(d))
7575
76+
7677Examples
7778--------
7879
@@ -105,15 +106,15 @@ Source
105106
106107 ++ mum :: mug with murmur3
107108 ~/ %mum
108− |= a=*
109+ |= a/*
109110 |^ (trim ?@(a a (mix $(a -.a) (mix 0x7fff.ffff $(a +.a)))))
110111 ++ spec :: standard murmur3
111− |= [syd=@ key=@]
112+ |= {syd/@ key/@}
112113 ?> (lte (met 5 syd) 1)
113114 =+ ^= row
114− |= [a=@ b=@]
115+ |= {a/@ b/@}
115116 (con (end 5 1 (lsh 0 a b)) (rsh 0 (sub 32 a) b))
116− =+ mow=|=([a=@ b=@] (end 5 1 (mul a b)))
117+ =+ mow=|=({a/@ b/@} (end 5 1 (mul a b)))
117118 =+ len=(met 5 key)
118119 =- =. goc (mix goc len)
119120 =. goc (mix goc (rsh 4 1 goc))
@@ -127,22 +128,13 @@ Source
127128 ?: =(inx len) goc
128129 =+ kop=(cut 5 [inx 1] key)
129130 =. kop (mow kop 0xcc9e.2d51)
130− =. kop (row 15 kop)
131+ =. kop (row 15 kop)
131132 =. kop (mow kop 0x1b87.3593)
132133 =. goc (mix kop goc)
133134 =. goc (row 13 goc)
134135 =. goc (end 5 1 (add 0xe654.6b64 (mul 5 goc)))
135136 $(inx +(inx))
136− ::
137− ++ trim :: 31-bit nonzero
138− |= key=@
139− =+ syd=0xcafe.babe
140− |- ^- @
141− =+ haz=(spec syd key)
142− =+ ham=(mix (rsh 0 31 haz) (end 0 31 haz))
143− ?.(=(0 ham) ham $(syd +(syd)))
144− --
145− ::
137+
146138
147139Examples
148140--------
docs/system/hoon/library/2f.md+19−13
@@ -9,7 +9,7 @@ boolean.
99Accepts
1010-------
1111
12−`a` is a [noun]().
12+`a` is a noun.
1313
1414`b` is a noun.
1515
@@ -22,9 +22,9 @@ A boolean atom.
2222Source
2323------
2424
25− ++ aor :: alphabetic-order
25+ ++ aor :: a-order
2626 ~/ %aor
27− |= [a=* b=*]
27+ |= {a/* b/*}
2828 ^- ?
2929 ?: =(a b) &
3030 ?. ?=(@ a)
@@ -39,6 +39,7 @@ Source
3939 $(a (rsh 3 1 a), b (rsh 3 1 b))
4040 (lth c d)
4141
42+
4243Examples
4344--------
4445
@@ -72,7 +73,7 @@ boolean.
7273Accepts
7374-------
7475
75−`a` is a [noun]().
76+`a` is a noun.
7677
7778`b` is a noun.
7879
@@ -86,7 +87,7 @@ Source
8687
8788 ++ dor :: d-order
8889 ~/ %dor
89− |= [a=* b=*]
90+ |= {a/* b/*}
9091 ^- ?
9192 ?: =(a b) &
9293 ?. ?=(@ a)
@@ -97,6 +98,7 @@ Source
9798 ?. ?=(@ b) &
9899 (lth a b)
99100
101+
100102Examples
101103--------
102104
@@ -125,27 +127,28 @@ XX revisit
125127Accepts
126128-------
127129
128−`a` is a [noun]().
130+`a` is a noun.
129131
130132`b` is a noun.
131133
132134Produces
133135--------
134136
135−A boolean [atom]().
137+A boolean atom.
136138
137139Source
138140------
139141
140142 ++ gor :: g-order
141143 ~/ %gor
142− |= [a=* b=*]
144+ |= {a/* b/*}
143145 ^- ?
144146 =+ [c=(mug a) d=(mug b)]
145147 ?: =(c d)
146148 (dor a b)
147149 (lth c d)
148150
151+
149152Examples
150153--------
151154
@@ -185,14 +188,14 @@ Recursive hash comparator gate.
185188Accepts
186189-------
187190
188−`a` is a [noun]().
191+`a` is a noun.
189192
190193`b` is a noun.
191194
192195Produces
193196--------
194197
195−A boolean [atom]().
198+A boolean atom.
196199
197200
198201Source
@@ -200,7 +203,7 @@ Source
200203
201204 ++ hor :: h-order
202205 ~/ %hor
203− |= [a=* b=*]
206+ |= {a/* b/*}
204207 ^- ?
205208 ?: ?=(@ a)
206209 ?. ?=(@ b) &
@@ -209,6 +212,8 @@ Source
209212 ?: =(-.a -.b)
210213 (gor +.a +.b)
211214 (gor -.a -.b)
215+ ::
216+
212217
213218Examples
214219--------
@@ -234,7 +239,7 @@ XX revisit
234239Accepts
235240-------
236241
237−`a` is a [noun]()
242+`a` is a noun
238243
239244`b` is a noun
240245
@@ -246,13 +251,14 @@ Source
246251
247252 ++ vor :: v-order
248253 ~/ %vor
249− |= [a=* b=*]
254+ |= {a/* b/*}
250255 ^- ?
251256 =+ [c=(mug (mug a)) d=(mug (mug b))]
252257 ?: =(c d)
253258 (dor a b)
254259 (lth c d)
255260
261+
256262Examples
257263--------
258264
docs/system/hoon/library/2g.md+1−1
@@ -1 +1 @@
1−# 2g: unsigned powers
1+# 2g: unsigned powers (currently undocumented)
docs/system/hoon/library/2h.md+75−66
@@ -4,7 +4,7 @@
44
55Set operations
66
7−Core whose [arm]()s contain a variety of functions that operate on [`++set`]()s. Its [sample]() accepts the input [`++set`]() to be manipulated.
7+Core whose arms contain a variety of functions that operate on `++set`s. Its sample accepts the input `++set` to be manipulated.
88
99Accepts
1010-------
@@ -16,7 +16,7 @@ Source
1616
1717 ++ in :: set engine
1818 ~/ %in
19− |/ a=(set)
19+ |_ a/(set)
2020
2121Examples
2222--------
@@ -34,9 +34,9 @@ producing a boolean.
3434Accepts
3535-------
3636
37−`a` is a [`++set`]().
37+`a` is a `++set`.
3838
39−`b` is a [wet]() [gate]() that accepts a [noun]() and produces a boolean.
39+`b` is a wet gate that accepts a noun and produces a boolean.
4040
4141Produces
4242--------
@@ -48,21 +48,21 @@ Source
4848
4949 +- all :: logical AND
5050 ~/ %all
51− |* b=$+(* ?)
51+ |* b/$-(* ?)
5252 |- ^- ?
5353 ?~ a
5454 &
5555 ?&((b n.a) $(a l.a) $(a r.a))
56− ::
56+
5757
5858Examples
5959--------
6060
61− ~zod/try=> =b (sa `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
62− ~zod/try=> (~(all in b) |=(a=* ?@(+.a & |)))
61+ ~zod/try=> =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
62+ ~zod/try=> (~(all in b) |=(a/* ?@(+.a & |)))
6363 %.n
64− ~zod/try=> =b (sa `(list ,@t)`['john' 'bonita' 'daniel' 'madeleine' ~])
65− ~zod/try=> (~(all in b) |=(a=@t (gte a 100)))
64+ ~zod/try=> =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
65+ ~zod/try=> (~(all in b) |=(a/@t (gte a 100)))
6666 %.y
6767
6868------------------------------------------------------------------------
@@ -76,9 +76,9 @@ Computes the logical OR on every element of `a` slammed with `b`.
7676Accepts
7777-------
7878
79−`a` is a [`++set`]().
79+`a` is a `++set`.
8080
81−`b` is a [gate]() that accepts a noun and produces a boolean.
81+`b` is a gate that accepts a noun and produces a boolean.
8282
8383Produces
8484--------
@@ -90,21 +90,22 @@ Source
9090
9191 +- any :: logical OR
9292 ~/ %any
93− |* b=$+(* ?)
93+ |* b/$-(* ?)
9494 |- ^- ?
9595 ?~ a
9696 |
9797 ?|((b n.a) $(a l.a) $(a r.a))
9898 ::
9999
100+
100101Examples
101102--------
102103
103− ~zod/try=> =b (sa `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
104− ~zod/try=> (~(any in b) |=(a=* ?@(+.a & |)))
104+ ~zod/try=> =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
105+ ~zod/try=> (~(any in b) |=(a/* ?@(+.a & |)))
105106 %.y
106− ~zod/try=> =b (sa `(list ,@t)`['john' 'bonita' 'daniel' 'madeleine' ~])
107− ~zod/try=> (~(any in b) |=(a=@t (lte a 100)))
107+ ~zod/try=> =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
108+ ~zod/try=> (~(any in b) |=(a/@t (lte a 100)))
108109 %.n
109110
110111------------------------------------------------------------------------
@@ -113,14 +114,14 @@ Examples
113114
114115Remove noun
115116
116−Removes `b` from the [`++set`]() `a`.
117+Removes `b` from the `++set` `a`.
117118
118119Accepts
119120-------
120121
121122`a` is a set.
122123
123−`b` is a [noun]().
124+`b` is a noun.
124125
125126Produces
126127--------
@@ -132,7 +133,7 @@ Source
132133
133134 +- del :: b without any a
134135 ~/ %del
135− |* b=*
136+ |* b/*
136137 |- ^+ a
137138 ?~ a
138139 ~
@@ -140,7 +141,7 @@ Source
140141 ?: (hor b n.a)
141142 [n.a $(a l.a) r.a]
142143 [n.a l.a $(a r.a)]
143− |- ^- ?(~ _a)
144+ |- ^- {$?($~ _a)}
144145 ?~ l.a r.a
145146 ?~ r.a l.a
146147 ?: (vor n.l.a n.r.a)
@@ -152,10 +153,10 @@ Source
152153Examples
153154--------
154155
155− ~zod/try=> =b (sa `(list ,@t)`['a' 'b' 'c' ~])
156+ ~zod/try=> =b (sa `(list @t)`['a' 'b' 'c' ~])
156157 ~zod/try=> (~(del in b) 'a')
157158 {'c' 'b'}
158− ~zod/try=> =b (sa `(list ,@t)`['john' 'bonita' 'daniel' 'madeleine' ~])
159+ ~zod/try=> =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
159160 ~zod/try=> (~(del in b) 'john')
160161 {'bonita' 'madeleine' 'daniel'}
161162 ~zod/try=> (~(del in b) 'susan')
@@ -172,34 +173,35 @@ Produce the axis of `b` within `a`.
172173Accepts
173174-------
174175
175−`a` is a [`++set`]().
176+`a` is a `++set`.
176177
177−`b` is a [noun]().
178+`b` is a noun.
178179
179180Produces
180181--------
181182
182−The [`++unit`]() of an atom.
183+The `++unit` of an atom.
183184
184185Source
185186------
186187
187188 +- dig :: axis of a in b
188− |= b=*
189+ |= b/*
189190 =+ c=1
190− |- ^- (unit ,@)
191+ |- ^- (unit @)
191192 ?~ a ~
192193 ?: =(b n.a) [~ u=(peg c 2)]
193− ?: (gor b n.a)
194+ ?: (hor b n.a)
194195 $(a l.a, c (peg c 6))
195196 $(a r.a, c (peg c 7))
196197 ::
197198
198199
200+
199201Examples
200202--------
201203
202− ~zod/try=> =a (sa `(list ,@)`[1 2 3 4 5 6 7 ~])
204+ ~zod/try=> =a (sa `(list @)`[1 2 3 4 5 6 7 ~])
203205 ~zod/try=> a
204206 {5 4 7 6 1 3 2}
205207 ~zod/try=> -.a
@@ -217,7 +219,7 @@ Examples
217219
218220Concatenate
219221
220−Insert the elements of a [`++list`]() `b` into a [`++set`]() `a`.
222+Insert the elements of a `++list` `b` into a `++set` `a`.
221223
222224Accepts
223225-------
@@ -236,11 +238,11 @@ Source
236238
237239 +- gas :: concatenate
238240 ~/ %gas
239− |= b=(list ,_?>(?=(^ a) n.a))
241+ |= b/(list _?>(?=(^ a) n.a))
240242 |- ^+ a
241243 ?~ b
242244 a
243− $(b t.b, a (put(+< a) i.b))
245+ $(b t.b, a (put i.b))
244246 ::
245247
246248
@@ -249,7 +251,7 @@ Examples
249251
250252 ~zod/try=> b
251253 {'bonita' 'madeleine' 'rudolf' 'john'}
252− ~zod/try=> (~(gas in b) `(list ,@t)`['14' 'things' 'number' '1.337' ~])
254+ ~zod/try=> (~(gas in b) `(list @t)`['14' 'things' 'number' '1.337' ~])
253255 {'1.337' '14' 'number' 'things' 'bonita' 'madeleine' 'rudolf' 'john'}
254256 ~zod/try=> (~(gas in s) `(list ,@t)`['1' '2' '3' ~])
255257 {'1' '3' '2' 'e' 'd' 'a' 'c' 'b'}
@@ -279,7 +281,7 @@ Source
279281
280282 +- has :: b exists in a check
281283 ~/ %has
282− |* b=*
284+ |* b/*
283285 |- ^- ?
284286 ?~ a
285287 |
@@ -294,7 +296,7 @@ Source
294296Examples
295297--------
296298
297− ~zod/try=> =a (~(gas in `(set ,@t)`~) `(list ,@t)`[`a` `b` `c` ~])
299+ ~zod/try=> =a (~(gas in `(set @t)`~) `(list @t)`[`a` `b` `c` ~])
298300 ~zod/try=> (~(has in a) `a`)
299301 %.y
300302 ~zod/try=> (~(has in a) 'z')
@@ -306,7 +308,7 @@ Examples
306308
307309Intersection
308310
309−Produces a set of the intersection between two [`++set`]()s of the same type,
311+Produces a set of the intersection between two `++set`s of the same type,
310312`a` and `b`.
311313
312314Accepts
@@ -319,14 +321,14 @@ Accepts
319321Produces
320322--------
321323
322−A [`++set`]().
324+A `++set`.
323325
324326Source
325327------
326328
327− +- int :: intersection
329+ +- int :: intersection
328330 ~/ %int
329− |* b=_a
331+ |* b/_a
330332 |- ^+ a
331333 ?~ b
332334 ~
@@ -337,8 +339,10 @@ Source
337339 ?: =(n.b n.a)
338340 [n.a $(a l.a, b l.b) $(a r.a, b r.b)]
339341 ?: (hor n.b n.a)
340− %- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b)
341− %- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b)
342+ %- uni(a $(a l.a, b [n.b l.b ~])) $(b r.b)
343+ %- uni(a $(a r.a, b [n.b ~ r.b])) $(b l.b)
344+ ::
345+
342346
343347
344348Examples
@@ -359,26 +363,26 @@ Examples
359363
360364Put b in a
361365
362−Add an element `b` to the [`++set`]() `a`.
366+Add an element `b` to the `++set` `a`.
363367
364368Accepts
365369-------
366370
367371`a` is a set.
368372
369−`b` is a [noun]().
373+`b` is a noun.
370374
371375Produces
372376--------
373377
374−A [`++set`]().
378+A `++set`.
375379
376380Source
377381------
378382
379− +- put :: puts b in a
383+ +- put :: puts b in a, sorted
380384 ~/ %put
381− |* b=*
385+ |* b/*
382386 |- ^+ a
383387 ?~ a
384388 [b ~ ~]
@@ -401,7 +405,7 @@ Source
401405Examples
402406--------
403407
404− ~zod/try=> =a (~(gas in `(set ,@t)`~) `(list ,@t)`[`a` `b` `c` ~])
408+ ~zod/try=> =a (~(gas in `(set @t)`~) `(list @t)`[`a` `b` `c` ~])
405409 ~zod/try=> =b (~(put in a) `d`)
406410 ~zod/try=> b
407411 {`d` `a` `c` `b`}
@@ -414,14 +418,14 @@ Examples
414418
415419Accumulate
416420
417−Accumulate the elements of `a` using a [gate]() `c` and an accumulator `b`.
421+Accumulate the elements of `a` using a gate `c` and an accumulator `b`.
418422
419423Accepts
420424--------
421425
422−`a` is a [`++set`]().
426+`a` is a `++set`.
423427
424−`b` is a [noun]().
428+`b` is a noun.
425429
426430`c` is a gate.
427431
@@ -433,21 +437,21 @@ A noun.
433437Source
434438------
435439
436− +- rep :: replace by tile
437− |* [b=* c=_,*]
438− |-
439− ?~ a b
440− $(a r.a, b $(a l.a, b (c n.a b)))
441− ::
440+ +- rep :: replace by product
441+ |* b/_|=({* *} +<+)
442+ |-
443+ ?~ a +<+.b
444+ $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
445+
442446
443447
444448Examples
445449--------
446450
447− ~zod/try=> =a (~(gas in *(set ,@)) [1 2 3 ~])
451+ ~zod/try=> =a (~(gas in *(set @)) [1 2 3 ~])
448452 ~zod/try=> a
449453 {1 3 2}
450− ~zod/try=> (~(rep in a) 0 |=([a=@ b=@] (add a b)))
454+ ~zod/try=> (~(rep in a) 0 |=([a/@ b/@] (add a b)))
451455 6
452456
453457------------------------------------------------------------------------
@@ -456,7 +460,7 @@ Examples
456460
457461Set to list
458462
459−Flattens the [`++set`]() `a` into a [`++list`]().
463+Flattens the `++set` `a` into a `++list`.
460464
461465Accepts
462466-------
@@ -471,23 +475,24 @@ A list.
471475Source
472476------
473477
474− +- tap :: list tiles a set
478+ +- tap :: convert to list
475479 ~/ %tap
476− |= b=(list ,_?>(?=(^ a) n.a))
480+ |= b/(list _?>(?=(^ a) n.a))
477481 ^+ b
478482 ?~ a
479483 b
480− $(a r.a, b [n.a $(a l.a)])
484+ $(a r.a b [n.a $(a l.a)])
481485 ::
482486
483487
488+
484489Examples
485490--------
486491
487− ~zod/try=> =s (sa `(list ,@t)`['a' 'b' 'c' 'd' 'e' ~])
492+ ~zod/try=> =s (sa `(list @t)`['a' 'b' 'c' 'd' 'e' ~])
488493 ~zod/try=> s
489494 {'e' 'd' 'a' 'c' 'b'}
490− ~zod/try=> (~(tap in s) `(list ,@t)`['1' '2' '3' ~])
495+ ~zod/try=> (~(tap in s) `(list @t)`['1' '2' '3' ~])
491496 ~['b' 'c' 'a' 'd' 'e' '1' '2' '3']
492497 ~zod/try=> b
493498 {'bonita' 'madeleine' 'daniel' 'john'}
@@ -520,7 +525,8 @@ Source
520525
521526 +- uni :: union
522527 ~/ %uni
523− |* b=_a
528+ |* b/_a
529+ ?: =(a b) a
524530 |- ^+ a
525531 ?~ b
526532 a
@@ -537,6 +543,7 @@ Source
537543 ?: (hor n.a n.b)
538544 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
539545 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
546+ ::
540547
541548
542549Examples
@@ -575,6 +582,8 @@ Source
575582 +- wyt :: size of set
576583 |- ^- @
577584 ?~(a 0 +((add $(a l.a) $(a r.a))))
585+ --
586+
578587
579588
580589Examples
docs/system/hoon/library/2i.md+99−87
@@ -5,12 +5,13 @@ Map operations
55
66 ++ by :: map engine
77 ~/ %by
8− |/ a=(map)
8+ |_ a/(map)
9+
910
1011Container arm for map operation arms. A map is a set of key, value
11−pairs. The contained arms inherit it's [sample]() [map](), `a`.
12+pairs. The contained arms inherit it's sample map, `a`.
1213
13−`a` is a [map]().
14+`a` is a map.
1415
1516 ~zod/try=> ~(. by (mo (limo [%a 1] [%b 2] ~)))
1617 <19.irb [nlr([p={%a %b} q=@ud]) <414.rvm 101.jzo 1.ypj %164>]>
@@ -23,26 +24,28 @@ Logical AND
2324
2425 +- all :: logical AND
2526 ~/ %all
26− |* b=$+(* ?)
27+ |* b/$-(* ?)
2728 |- ^- ?
2829 ?~ a
2930 &
3031 ?&((b q.n.a) $(a l.a) $(a r.a))
32+ ::
33+
3134
3235Computes the logical AND on the results of slamming every element in map
3336`a` with gate `b`. Produces a loobean.
3437
35−`a` is a [map]().
38+`a` is a map.
3639
37−`b` is a [wet gate]().
40+`b` is a wet gate.
3841
39− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
40− ~zod/try=> (~(all by b) |=(a=* ?@(a & |)))
42+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
43+ ~zod/try=> (~(all by b) |=(a/* ?@(a & |)))
4144 %.n
42− ~zod/try=> =a (mo `(list ,[@t @u])`[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
43− ~zod/try=> (~(all by a) |=(a=@ (lte a 6)))
45+ ~zod/try=> =a (mo `(list {@t @u})`[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
46+ ~zod/try=> (~(all by a) |=(a/@ (lte a 6)))
4447 %.y
45− ~zod/try=> (~(all by a) |=(a=@ (lte a 4)))
48+ ~zod/try=> (~(all by a) |=(a/@ (lte a 4)))
4649 %.n
4750
4851------------------------------------------------------------------------
@@ -62,14 +65,14 @@ Logical OR
6265Computes the logical OR on the results of slamming every element with
6366gate `b`. Produces a loobean.
6467
65−`a` is a [map]().
68+`a` is a map.
6669
67−`b` is a [wet gate]().
70+`b` is a wet gate.
6871
69− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
70− ~zod/try=> (~(all by b) |=(a=* ?@(a & |)))
72+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
73+ ~zod/try=> (~(all by b) |=(a/* ?@(a & |)))
7174 %.y
72− ~zod/try=> =a (mo `(list ,[@t @u])`[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
75+ ~zod/try=> =a (mo `(list {@t @u})`[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
7376 ~zod/try=> (~(any by a) |=(a=@ (lte a 4)))
7477 %.y
7578
@@ -81,7 +84,7 @@ Delete
8184
8285 +- del :: delete at key b
8386 ~/ %del
84− |* b=*
87+ |* b/*
8588 |- ^+ a
8689 ?~ a
8790 ~
@@ -89,20 +92,21 @@ Delete
8992 ?: (gor b p.n.a)
9093 [n.a $(a l.a) r.a]
9194 [n.a l.a $(a r.a)]
92− |- ^- ?(~ _a)
95+ |- ^- {$?($~ _a)}
9396 ?~ l.a r.a
9497 ?~ r.a l.a
9598 ?: (vor p.n.l.a p.n.r.a)
9699 [n.l.a l.l.a $(l.a r.l.a)]
97100 [n.r.a $(r.a l.r.a) r.r.a]
101+ ::
98102
99103Produces map `a` with the element located at key `b` removed.
100104
101−`a` is a [map]().
105+`a` is a map.
102106
103−`b` is a key as a [noun]().
107+`b` is a key as a noun.
104108
105− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
109+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
106110 ~zod/try=> (~(del by b) `a`)
107111 {[p=`b` q=[2 3]]}
108112
@@ -112,23 +116,25 @@ Produces map `a` with the element located at key `b` removed.
112116
113117Axis of key
114118
115− +- dig :: axis of key
116− |= b=*
119+ +- dig :: axis of b key
120+ |= b/*
117121 =+ c=1
118− |- ^- (unit ,@)
122+ |- ^- (unit @)
119123 ?~ a ~
120124 ?: =(b p.n.a) [~ u=(peg c 2)]
121125 ?: (gor b p.n.a)
122126 $(a l.a, c (peg c 6))
123127 $(a r.a, c (peg c 7))
128+ ::
129+
124130
125131Produce the axis of key `b` within map `a`.
126132
127−`a` is a [map]().
133+`a` is a map.
128134
129−`b` is a key as a [noun]().
135+`b` is a key as a noun.
130136
131− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
137+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
132138 ~zod/try=> (~(dig by b) `b`)
133139 [~ 2]
134140
@@ -140,21 +146,22 @@ Concatenate
140146
141147 +- gas :: concatenate
142148 ~/ %gas
143− |* b=(list ,[p=* q=*])
144− => .(b `(list ,_?>(?=(^ a) n.a))`b)
149+ |= b/(list _?>(?=(^ a) n.a))
145150 |- ^+ a
146151 ?~ b
147152 a
148− $(b t.b, a (put(+< a) p.i.b q.i.b))
153+ $(b t.b, a (put i.b))
154+ ::
155+
149156
150157Insert a list of key-value pairs `b` into map `a`.
151158
152−`a` is a [map]().
159+`a` is a map.
153160
154−`b` is a [list]() of [cells]() of key-value nouns `p` and `q`.
161+`b` is a list of cells of key-value nouns `p` and `q`.
155162
156− ~zod/try=> =a (mo `(list ,[@t *])`[[`a` 1] [`b` 2] ~])
157− ~zod/try=> =b `(list ,[@t *])`[[`c` 3] [`d` 4] ~]
163+ ~zod/try=> =a (mo `(list {@t *})`[[`a` 1] [`b` 2] ~])
164+ ~zod/try=> =b `(list {@t *})`[[`c` 3] [`d` 4] ~]
158165 ~zod/try=> (~(gas by a) b)
159166 {[p=`d` q=4] [p=`a` q=1] [p=`c` q=3] [p=`b` q=2]}
160167
@@ -178,11 +185,11 @@ Grab unit value
178185
179186Produce the unit value of the value located at key `b` within map `a`.
180187
181−`a` is a [map]()
188+`a` is a map
182189
183−`b` is a [key]() as a [noun]()
190+`b` is a key as a noun
184191
185− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
192+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
186193 ~zod/try=> (~(get by b) `b`)
187194 [~ [2 3]]
188195
@@ -193,18 +200,17 @@ Produce the unit value of the value located at key `b` within map `a`.
193200Assert
194201
195202 +- got
196− |* b=*
197− %- need
198− %- get(+< a) b
203+ |* b/*
204+ (need (get b))
199205
200206Produce the value located at key `b` within map `a`. Crash if key `b`
201207does not exist.
202208
203−`a` is a [map]().
209+`a` is a map.
204210
205−`b` is a [key]().
211+`b` is a key.
206212
207− ~zod/try=> =m (mo `(list ,[@t *])`[['a' 1] ['b' 2] ~])
213+ ~zod/try=> =m (mo `(list {@t *})`[['a' 1] ['b' 2] ~])
208214 ~zod/try=> m
209215 {[p='a' q=1] [p='b' q=2]}
210216 ~zod/try=> (~(get by m) 'a')
@@ -222,17 +228,18 @@ Key existence check
222228
223229 +- has :: key existence check
224230 ~/ %has
225− |* b=*
226− !=(~ (get(+< a) b))
231+ |* b/*
232+ !=(~ (get b))
233+
227234
228235Checks whether map `a` contains an element with key `b`, producing a
229236loobean.
230237
231−`a` is a [map]().
238+`a` is a map.
232239
233−`b` is a key as a [noun]().
240+`b` is a key as a noun.
234241
235− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
242+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
236243 ~zod/try=> (~(has by b) `b`)
237244 %.y
238245 ~zod/try=> (~(has by b) `c`)
@@ -246,7 +253,7 @@ Intersection
246253
247254 +- int :: intersection
248255 ~/ %int
249− |* b=_a
256+ |* b/_a
250257 |- ^+ a
251258 ?~ b
252259 ~
@@ -255,41 +262,42 @@ Intersection
255262 ?: (vor p.n.a p.n.b)
256263 ?: =(p.n.b p.n.a)
257264 [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
258− ?: (hor p.n.b p.n.a)
259− %- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b)
260− %- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b)
265+ ?: (gor p.n.b p.n.a)
266+ %- uni(a $(a l.a, b [n.b l.b ~])) $(b r.b)
267+ %- uni(a $(a r.a, b [n.b ~ r.b])) $(b l.b)
261268 ?: =(p.n.a p.n.b)
262269 [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
263− ?: (hor p.n.a p.n.b)
264− %- uni(+< $(b l.b, a [n.a l.a ~])) $(a r.a)
265− %- uni(+< $(b r.b, a [n.a ~ r.a])) $(a l.a)
270+ ?: (gor p.n.a p.n.b)
271+ %- uni(a $(b l.b, a [n.a l.a ~])) $(a r.a)
272+ %- uni(a $(b r.b, a [n.a ~ r.a])) $(a l.a)
273+ ::
266274
267275Produces a map of the (key) intersection between two maps of the same
268276type, `a` and `b`. If both maps have an identical key that point to
269277different values, the element from map `b` is used.
270278
271−`a` is a [map]().
279+`a` is a map.
272280
273−`b` is a [map]().
281+`b` is a map.
274282
275− ~zod/try=> =n (mo `(list ,[@t *])`[['a' 1] ['c' 3] ~])
283+ ~zod/try=> =n (mo `(list {@t *})`[['a' 1] ['c' 3] ~])
276284 ~zod/try=> n
277285 {[p='a' q=1] [p='c' q=3]}
278286 ~zod/try=> m
279287 {[p='a' q=1] [p='b' q=2]}
280288 ~zod/try=> (~(int by m) n)
281289 {[p='a' q=1]}
282− ~ravpel-holber/try=> =p (mo `(list ,[@t *])`[['a' 2] ['b' 2] ~])
290+ ~ravpel-holber/try=> =p (mo `(list {@t *})`[['a' 2] ['b' 2] ~])
283291 ~zod/try=> p
284292 {[p='a' q=2] [p='b' q=2]}
285293 ~zod/try=> (~(int by p) n)
286294 {[p='a' q=2]}
287− ~zod/try=> =q (mo `(list ,[@t *])`[['a' 2] ['c' 2] ~])
295+ ~zod/try=> =q (mo `(list {@t *})`[['a' 2] ['c' 2] ~])
288296 ~zod/try=> q
289297 {[p='a' q=2] [p='b' q=2]}
290298 ~zod/try=> (~(int by p) q)
291299 {[p='a' q=2] [p='b' q=2]}
292− ~zod/try=> =o (mo `(list ,[@t *])`[['c' 3] ['d' 4] ~])
300+ ~zod/try=> =o (mo `(list {@t *})`[['c' 3] ['d' 4] ~])
293301 ~zod/try=> (~(int by m) o)
294302 {}
295303
@@ -338,7 +346,7 @@ Add key-value pair
338346
339347 +- put :: adds key-value pair
340348 ~/ %put
341− |* [b=* c=*]
349+ |* {b/* c/*}
342350 |- ^+ a
343351 ?~ a
344352 [[b c] ~ ~]
@@ -357,10 +365,11 @@ Add key-value pair
357365 ?: (vor p.n.a p.n.d)
358366 [n.a l.a d]
359367 [n.d [n.a l.a l.d] r.d]
368+ ::
360369
361370Produces `a` with the addition of the key-value pair of `b` and `c`.
362371
363−`a` is a [map]().
372+`a` is a map.
364373
365374`b` is a key of the same type as the keys in `a`.
366375
@@ -381,10 +390,11 @@ Produces `a` with the addition of the key-value pair of `b` and `c`.
381390### `+-rep:by`
382391
383392 +- rep :: replace by product
384− |* [b=* c=_,*]
393+ |* b/_|=({* *} +<+)
385394 |-
386− ?~ a b
387− $(a r.a, b $(a l.a, b (c q.n.a b)))
395+ ?~ a +<+.b
396+ $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
397+ ::
388398
389399Accumulate using gate from values in map
390400
@@ -395,7 +405,7 @@ XX interface changing.
395405### `+-rib:by`
396406
397407 +- rib :: transform + product
398− |* [b=* c=_,*]
408+ |* {b/* c/$-(* *)}
399409 |- ^+ [b a]
400410 ?~ a [b ~]
401411 =+ d=(c n.a b)
@@ -403,6 +413,7 @@ XX interface changing.
403413 =+ e=$(a l.a, b -.d)
404414 =+ f=$(a r.a, b -.e)
405415 [-.f [n.a +.e +.f]]
416+ ::
406417
407418Replace values with accumulator
408419
@@ -414,23 +425,23 @@ XX interface changing, possibly disappearing
414425
415426Transform values
416427
417− +- run :: turns to tuples
418− |* b=_,*
419− |-
428+ +- run :: apply gate to values
429+ |* b/$-(* *)
430+ |-
420431 ?~ a a
421− a(n (b q.n.a), l $(a l.a), r $(a r.a))
432+ [n=[p=p.n.a q=(b q.n.a)] l=$(a l.a) r=$(a r.a)]
422433
423434Iterates over every value in set `a` using gate `b`. Produces a map.
424435
425−`a` is a [map]().
436+`a` is a map.
426437
427−`b` is a [wet gate]().
438+`b` is a wet gate.
428439
429440 ~zod/try=> m
430441 {[p='a' q=1] [p='b' q=2]}
431442 ~zod/try=> ^+(m (~(run by m) dec))
432443 {[p='a' q=0] [p='b' q=1]}
433− ~zod/try=> `(map ,@tas ,@t)`(~(run by m) (cury scot %ux))
444+ ~zod/try=> `(map @tas @t)`(~(run by m) (cury scot %ux))
434445 {[p=%a q='0x1'] [p=%b q='0x2']}
435446
436447------------------------------------------------------------------------
@@ -441,18 +452,19 @@ Listify pairs
441452
442453 +- tap :: listify pairs
443454 ~/ %tap
444− |= b=(list ,_?>(?=(^ a) n.a))
455+ |= b/(list _?>(?=(^ a) n.a))
445456 ^+ b
446457 ?~ a
447458 b
448459 $(a r.a, b [n.a $(a l.a)])
460+ ::
449461
450462Produces the list of all elements in map `a` that is prepended to list
451463`b`, which is empty by default.
452464
453−`a` is a [map]().
465+`a` is a map.
454466
455−`b` is a [list]().
467+`b` is a list.
456468
457469 {[p='a' q=1] [p='b' q=2]}
458470 ~zod/try=> `*`m
@@ -470,7 +482,7 @@ Union
470482
471483 +- uni :: union, merge
472484 ~/ %uni
473− |* b=_a
485+ |* b/_a
474486 |- ^+ a
475487 ?~ b
476488 a
@@ -479,21 +491,21 @@ Union
479491 ?: (vor p.n.a p.n.b)
480492 ?: =(p.n.b p.n.a)
481493 [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
482− ?: (hor p.n.b p.n.a)
494+ ?: (gor p.n.b p.n.a)
483495 $(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
484496 $(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
485497 ?: =(p.n.a p.n.b)
486498 [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
487− ?: (hor p.n.a p.n.b)
499+ ?: (gor p.n.a p.n.b)
488500 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
489501 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
490502
491503Produces a map of the union between the keys of `a` and `b`. If `b`
492504shares a key with `a`, the tuple from `a` is preserved.
493505
494−`a` is a [map]().
506+`a` is a map.
495507
496−`b` is a [map]().
508+`b` is a map.
497509
498510 ~zod/try=> m
499511 {[p='a' q=1] [p='b' q=2]}
@@ -519,8 +531,8 @@ shares a key with `a`, the tuple from `a` is preserved.
519531
520532Turn (with key)
521533
522− +- urn :: turn
523− |* b=$+([* *] *)
534+ +- urn :: apply gate to nodes
535+ |* b/$-({* *} *)
524536 |-
525537 ?~ a ~
526538 [n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)]
@@ -528,9 +540,9 @@ Turn (with key)
528540Iterates over every value in map `a` using gate `b`, which accepts both
529541the key and the value of each element as its sample.
530542
531−`a` is a [map]().
543+`a` is a map.
532544
533−`b` is a [wet gate]() that accepts two nouns (a key and a value) and
545+`b` is a wet gate that accepts two nouns (a key and a value) and
534546produces a noun (the new value).
535547
536548 ~zod/try=> m
@@ -554,7 +566,7 @@ Depth
554566
555567Produce the depth of the tree map `a`.
556568
557−`a` is a [map]().
569+`a` is a map.
558570
559571 ~zod/try=> m
560572 {[p='a' q=1] [p='b' q=2]}
docs/system/hoon/library/2j.md+35−185
@@ -3,13 +3,12 @@
33
44Jar engine
55
6− ++ ja :: jar engine
7− |/ a=(jar)
6+ |_ a/(jar)
87
98A container arm for `++jar` operation arms. A `++jar` is a `++map` of
10−`++list`s. The contained arms inherit the [sample]() jar.
9+`++list`s. The contained arms inherit the sample jar.
1110
12−`a` is a [jar]().
11+`a` is a jar.
1312
1413 ~zod/try=> ~(. ja (mo (limo a/"ho" b/"he" ~)))
1514 <2.dgz [nlr([p={%a %b} q=""]) <414.fvk 101.jzo 1.ypj %164>]>
@@ -20,14 +19,15 @@ A container arm for `++jar` operation arms. A `++jar` is a `++map` of
2019
2120Grab value by key
2221
23− +- get :: grab value by key
24− |* b=*
22+ +- get :: gets list by key
23+ |* b/*
2524 =+ c=(~(get by a) b)
2625 ?~(c ~ u.c)
26+ ::
2727
2828Produces a list retrieved from jar `a` using the key `b`.
2929
30−`a` is a [`++jar`](/doc/hoon/library/1#++jar).
30+`a` is a `++jar`.
3131
3232`b` is a key of the same type as the keys in `a`.
3333
@@ -48,14 +48,14 @@ Produces a list retrieved from jar `a` using the key `b`.
4848Prepend to list
4949
5050 +- add :: adds key-list pair
51− |* [b=* c=*]
52− =+ d=(get(+< a) b)
51+ |* {b/* c/*}
52+ =+ d=(get b)
5353 (~(put by a) b [c d])
5454
5555Produces jar `a` with value `c` prepended to the list located at key
5656`b`.
5757
58−`a` is a [jar]().
58+`a` is a jar.
5959
6060`b` is a key of the same type as the keys in `a`.
6161
@@ -74,19 +74,18 @@ Produces jar `a` with value `c` prepended to the list located at key
7474 ! type-fail
7575 ! exit
7676
77−------------------------------------------------------------------------
78−
77+**
7978### `++ju`
8079
8180Jug operations
8281
8382 ++ ju :: jug engine
84− |/ a=(jug)
83+ |/ a/(jug)
8584
8685Container arm for jug operation arms. A `++jug` is a `++map` of
87−`++sets`. The contained arms inherit its [sample]() jug, `a`.
86+`++sets`. The contained arms inherit its sample jug, `a`.
8887
89−`a` is a [jug]().
88+`a` is a jug.
9089
9190 ~zod/try=> ~(. ju (mo (limo a/(sa "ho") b/(sa "he") ~)))
9291 <2.dgz [nlr([p={%a %b} q={nlr(^$1{@tD $1}) nlr(^$3{@tD $3})}]) <414.fvk 101.jzo 1.ypj %164>]>
@@ -95,172 +94,20 @@ Container arm for jug operation arms. A `++jug` is a `++map` of
9594
9695Remove
9796
98− +- del :: delete at key b
99− |* [b=* c=*]
97+ +- del :: del key-set pair
98+ |* {b/* c/*}
10099 ^+ a
101− =+ d=(get(+< a) b)
100+ =+ d=(get b)
102101 =+ e=(~(del in d) c)
103102 ?~ e
104103 (~(del by a) b)
105104 (~(put by a) b e)
105+ ::
106106
107−Produces jug `a` with value `c` removed from set located at key `b`.
108−
109−`a` is a [jug]().
110−
111−`b` is a key of the same type as the keys in `a`.
112−
113−`c` is the value of the same type of the keys in `a` that is to be
114−removed.
115−
116− ~zod/try=> s
117− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
118− ~zod/try=> (~(del ju s) 'a' 1)
119− {[p='a' q={3 2}] [p='b' q={5 4 6}]}
120− ~zod/try=> (~(del ju s) 'c' 7)
121− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
122−
123−------------------------------------------------------------------------
124−
125−### `+-get:ju`
126−
127−Retrieve set
128−
129− +- get :: gets set by key
130− |* b=*
131− =+ c=(~(get by a) b)
132− ?~(c ~ u.c)
133−
134−Produces a set retrieved from jar `a` using key `b`.
135−
136−`a` is a [jar]().
137−
138−`b` is a key of the same type as the keys in `a`.
139−
140− ~zod/try=> s
141− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
142− ~zod/try=> (~(get ju s) 'a')
143− {1 3 2}
144− ~zod/try=> (~(get ju s) 'b')
145− {5 4 6}
146− ~zod/try=> (~(get ju s) 'c')
147− ~
148−
149−------------------------------------------------------------------------
150−
151−### `+-has:ju`
152−
153−Check contents
154−
155− +- has :: existence check
156− |* [b=* c=*]
157− ^- ?
158− (~(has in (get(+< a) b)) c)
159−
160−Computes whether a value `c` exists within the set located at key `b`
161−with jar `a`. Produces a loobean.
162−
163−`a` is a [set]().
164−
165−`b` is a key as a [noun]().
166−
167−`c` is a value as a [noun]().
168−
169− ~zod/try=> s
170− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
171− ~zod/try=> (~(has ju s) 'a' 3)
172− %.y
173− ~zod/try=> (~(has ju s) 'b' 6)
174− %.y
175− ~zod/try=> (~(has ju s) 'a' 7)
176− %.n
177− ~zod/try=> (~(has jus s) 'c' 7)
178− ! -find-limb.jus
179− ! find-none
180− ! exit
181− ~zod/try=> (~(has ju s) 'c' 7)
182− %.n
183−
184−------------------------------------------------------------------------
185−
186−### `+-put:ju`
187−
188−Add key-set pair
189−
190− +- put :: adds key-element pair
191− |* [b=* c=*]
192− ^+ a
193− =+ d=(get(+< a) b)
194− (~(put by a) b (~(put in d) c))
195−
196−Produces jar `a` with `c` added to the set value located at key `b`.
197−
198−`a` is a [set]().
199−
200−`b` is a key as a [noun]().
201−
202−`c` is a [value]().
203−
204− ~zod/try=> s
205− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
206− ~zod/try=> (~(put ju s) 'a' 7)
207− {[p='a' q={7 1 3 2}] [p='b' q={5 4 6}]}
208− ~zod/try=> (~(put ju s) 'a' 1)
209− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
210− ~zod/try=> (~(put ju s) 'c' 7)
211− {[p='a' q={1 3 2}] [p='c' q={7}] [p='b' q={5 4 6}]}
212−
213−------------------------------------------------------------------------
214−
215−### `++by`
216−
217−Map operations
218−
219− ++ by :: map engine
220− ~/ %by
221− |/ a=(map)
222−
223−Container arm for map operation arms. A map is a set of key, value
224−pairs. The contained arms inherit it's [sample]() [map](), `a`.
225−
226−`a` is a [map]().
227−
228− ~zod/try=> ~(. by (mo (limo [%a 1] [%b 2] ~)))
229− <19.irb [nlr([p={%a %b} q=@ud]) <414.rvm 101.jzo 1.ypj %164>]>
230−
231−
232−***
233−### `++ju`
234−
235−Jug operations
236−
237− ++ ju :: jug engine
238− |/ a=(jug)
239−
240−Container arm for jug operation arms. A `++jug` is a `++map` of
241−`++sets`. The contained arms inherit its [sample]() jug, `a`.
242−
243−`a` is a [jug]().
244−
245− ~zod/try=> ~(. ju (mo (limo a/(sa "ho") b/(sa "he") ~)))
246− <2.dgz [nlr([p={%a %b} q={nlr(^$1{@tD $1}) nlr(^$3{@tD $3})}]) <414.fvk 101.jzo 1.ypj %164>]>
247−
248−### `+-del:ju`
249−
250−Remove
251−
252− +- del :: delete at key b
253− |* [b=* c=*]
254− ^+ a
255− =+ d=(get(+< a) b)
256− =+ e=(~(del in d) c)
257− ?~ e
258− (~(del by a) b)
259− (~(put by a) b e)
260107
261108Produces jug `a` with value `c` removed from set located at key `b`.
262109
263−`a` is a [jug]().
110+`a` is a jug.
264111
265112`b` is a key of the same type as the keys in `a`.
266113
@@ -281,13 +128,14 @@ removed.
281128Retrieve set
282129
283130 +- get :: gets set by key
284− |* b=*
131+ |* b/*
285132 =+ c=(~(get by a) b)
286133 ?~(c ~ u.c)
134+ ::
287135
288136Produces a set retrieved from jar `a` using key `b`.
289137
290−`a` is a [jar]().
138+`a` is a jar.
291139
292140`b` is a key of the same type as the keys in `a`.
293141
@@ -307,18 +155,20 @@ Produces a set retrieved from jar `a` using key `b`.
307155Check contents
308156
309157 +- has :: existence check
310− |* [b=* c=*]
158+ |* {b/* c/*}
311159 ^- ?
312− (~(has in (get(+< a) b)) c)
160+ (~(has in (get b)) c)
161+ ::
162+
313163
314164Computes whether a value `c` exists within the set located at key `b`
315165with jar `a`. Produces a loobean.
316166
317−`a` is a [set]().
167+`a` is a set.
318168
319−`b` is a key as a [noun]().
169+`b` is a key as a noun.
320170
321−`c` is a value as a [noun]().
171+`c` is a value as a noun.
322172
323173 ~zod/try=> s
324174 {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
@@ -341,19 +191,19 @@ with jar `a`. Produces a loobean.
341191
342192Add key-set pair
343193
344− +- put :: adds key-element pair
345− |* [b=* c=*]
194+ +- put :: add key-set pair
195+ |* {b/* c/*}
346196 ^+ a
347− =+ d=(get(+< a) b)
197+ =+ d=(get b)
348198 (~(put by a) b (~(put in d) c))
349199
350200Produces jar `a` with `c` added to the set value located at key `b`.
351201
352−`a` is a [set]().
202+`a` is a set.
353203
354−`b` is a key as a [noun]().
204+`b` is a key as a noun.
355205
356−`c` is a [value]().
206+`c` is a value.
357207
358208 ~zod/try=> s
359209 {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
docs/system/hoon/library/2k.md+40−36
@@ -4,18 +4,18 @@
44Queue operations
55
66Container arm for queue operation arms. The contained arms inherit its
7−[sample]() `++qeu` `a`.
7+sample `++qeu` `a`.
88
99Accepts
1010-------
1111
12−`a` is a queue, [++qeu]().
12+`a` is a queue, ++qeu.
1313
1414Source
1515------
1616
1717 ++ to :: queue engine
18− |/ a=(qeu)
18+ |/ a/(qeu)
1919
2020### `+-bal:to`
2121
@@ -26,12 +26,12 @@ Vertically rebalances queue `a`.
2626Accepts
2727-------
2828
29−`a` is a [queue]().
29+`a` is a queue.
3030
3131Produces
3232--------
3333
34−A [queue]().
34+A queue.
3535
3636Source
3737------
@@ -39,13 +39,14 @@ Source
3939 +- bal
4040 |- ^+ a
4141 ?~ a ~
42− ?. |(?=(~ l.a) (vor n.a n.l.a))
42+ ?. |(?=($~ l.a) (vor n.a n.l.a))
4343 $(a [n.l.a l.l.a $(a [n.a r.l.a r.a])])
44− ?. |(?=(~ r.a) (vor n.a n.r.a))
44+ ?. |(?=($~ r.a) (vor n.a n.r.a))
4545 $(a [n.r.a $(a [n.a l.a l.r.a]) r.r.a])
4646 a
4747 ::
4848
49+
4950Examples
5051--------
5152
@@ -69,7 +70,7 @@ Produces the maximum depth of leaves (r.a and l.a) in queue `a`.
6970Accepts
7071-------
7172
72−`a` is a [queue]().
73+`a` is a queue.
7374
7475Produces
7576--------
@@ -85,16 +86,17 @@ Source
8586 +((max $(a l.a) $(a r.a)))
8687 ::
8788
89+
8890Examples
8991--------
9092
91− ~zod/try=> =a (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 4 5 6 7 ~])
93+ ~zod/try=> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 7 ~])
9294 ~zod/try=> ~(dep to a)
9395 4
94− ~zod/try=> =a (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 4 ~])
96+ ~zod/try=> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 ~])
9597 ~zod/try=> ~(dep to a)
9698 3
97− ~zod/try=> =a (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 ~])
99+ ~zod/try=> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 ~])
98100 ~zod/try=> ~(dep to a)
99101 2
100102 ~zod/try=> ~(dep to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
@@ -108,7 +110,7 @@ Examples
108110
109111Push list
110112
111−Push all elements of [`++list`]() `b` into the [`++queue`]().
113+Push all elements of `++list` `b` into the `++queue`.
112114
113115Accepts
114116-------
@@ -147,7 +149,7 @@ Examples
147149
148150Pop
149151
150−Produces the head and tail [`++queue`]() of `a`.
152+Produces the head and tail `++queue` of `a`.
151153
152154Accepts
153155-------
@@ -163,14 +165,14 @@ Source
163165------
164166
165167 +- get :: head-tail pair
166− |- ^+ [p=?>(?=(^ a) n.a) q=a]
168+ |- ^+ ?>(?=(^ a) [p=n.a q=*(qeu _n.a)])
167169 ?~ a
168170 !!
169171 ?~ r.a
170172 [n.a l.a]
171173 =+ b=$(a r.a)
172174 :- p.b
173− ?: |(?=(~ q.b) (vor n.a n.q.b))
175+ ?: |(?=($~ q.b) (vor n.a n.q.b))
174176 [n.a l.a q.b]
175177 [n.q.b [n.a l.a l.q.b] r.q.b]
176178 ::
@@ -178,7 +180,7 @@ Source
178180Examples
179181--------
180182
181− ~zod/try=> =s (~(gas to *(qeu ,@)) `(list ,@)`~[1 2 3])
183+ ~zod/try=> =s (~(gas to *(qeu @)) `(list @)`~[1 2 3])
182184 ~zod/try=> ~(get to s)
183185 [p=1 q={3 2}]
184186 ~zod/try=> ~(get to ~)
@@ -190,12 +192,12 @@ Examples
190192
191193Remove last element
192194
193−Removes the head of [`++queue`]() `a`, producing the resulting queue.
195+Removes the head of `++queue` `a`, producing the resulting queue.
194196
195197Accepts
196198-------
197199
198−`a` is a [queue]().
200+`a` is a queue.
199201
200202Produces
201203--------
@@ -208,14 +210,14 @@ Source
208210 +- nap :: removes head
209211 ?> ?=(^ a)
210212 ?: =(~ l.a) r.a
211− =+ b=get(+< l.a)
212− bal(+< ^+(a [p.b q.b r.a]))
213+ =+ b=get(a l.a)
214+ bal(a ^+(a [p.b q.b r.a]))
213215 ::
214216
215217Examples
216218--------
217219
218− ~zod/try=> =a (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 4 5 6 ~])
220+ ~zod/try=> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
219221 ~zod/try=> -.a
220222 n=6
221223 ~zod/try=> =b ~(nap to a)
@@ -232,13 +234,13 @@ Examples
232234
233235Insert
234236
235−Accept any [noun]() `b` and adds to [`++queue`]() `a` as the head, producing the
237+Accept any noun `b` and adds to `++queue` `a` as the head, producing the
236238resulting queue.
237239
238240Accepts
239241-------
240242
241−`a` is a [queue]().
243+`a` is a queue.
242244
243245`b` is any noun.
244246
@@ -251,17 +253,18 @@ Source
251253------
252254
253255 +- put :: insert new tail
254− |* b=*
256+ |* b/*
255257 |- ^+ a
256258 ?~ a
257259 [b ~ ~]
258− bal(+< a(l $(a l.a)))
260+ bal(a a(l $(a l.a)))
259261 ::
260262
263+
261264Examples
262265--------
263266
264− ~zod/try=> (~(gas to `(qeu ,@)`~) `(list ,@)`[3 1 2 4 5 6 ~])
267+ ~zod/try=> (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
265268 ~zod/try=> (~(put to a) 7)
266269 {7 6 5 4 2 1 3}
267270
@@ -271,18 +274,19 @@ Examples
271274
272275Queue to list
273276
274−Produces [`++queue`]() `a` as a [`++list`]() from front to back.
277+Produces `++queue` `a` as a `++list` from front to back.
275278
276279Accepts
277280-------
278281
279−`a` is a [queue]().
282+`a` is a queue.
280283
281284Source
282285------
283286
284− +- tap :: queue to list
285− |= b=(list ,_?>(?=(^ a) n.a))
287+ +- tap :: adds list to end
288+ |= b/(list _?>(?=(^ a) n.a))
289+ =+ z=0 :: XX breaks jet match
286290 ^+ b
287291 ?~ a
288292 b
@@ -292,22 +296,22 @@ Source
292296Examples
293297--------
294298
295− ~zod/try=> =a (~(gas to `(qeu ,@)`~) `(list ,@)`[3 1 2 4 5 6 ~])
299+ ~zod/try=> =a (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
296300 ~zod/try=> `*`a
297301 [6 0 2 [4 [5 0 0] 0] 1 0 3 0 0]
298− ~zod/try=> (~(tap to a) `(list ,@)`[99 100 101 ~])
302+ ~zod/try=> (~(tap to a) `(list @)`[99 100 101 ~])
299303 ~[3 1 2 4 5 6 99 100 101]
300304
301305------------------------------------------------------------------------
302306
303307### `+-top:to`
304308
305−Produces the head of [`++queue`]() `a` as a [`++unit`]() (an empty queue has no head).
309+Produces the head of `++queue` `a` as a `++unit` (an empty queue has no head).
306310
307311Accepts
308312-------
309313
310−`a` is a [queue]().
314+`a` is a queue.
311315
312316Produces
313317--------
@@ -318,14 +322,14 @@ Source
318322------
319323
320324 +- top :: produces head
321− |- ^- (unit ,_?>(?=(^ a) n.a))
325+ |- ^- (unit _?>(?=(^ a) n.a))
322326 ?~ a ~
323327 ?~(r.a [~ n.a] $(a r.a))
324328
325329Examples
326330--------
327331
328− ~zod/try=> =a (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 4 5 6 ~])
332+ ~zod/try=> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
329333 ~zod/try=> ~(top to a)
330334 [~ 1]
331335
docs/system/hoon/library/2n.md+37−31
@@ -10,14 +10,15 @@ Build `f` such that `(f x) .= (b (a x))`.
1010Source
1111------
1212
13− ++ cork |*([a=_,* b=gate] (corl b a)) :: compose forward
13+ ++ cork |*({a/_|=(* **) b/gate} (corl b a)) :: compose forward
14+
1415
1516Examples
1617--------
1718
1819 ~zod/try=> (:(cork dec dec dec) 20)
1920 17
20− ~zod/try=> =mal (mo (limo a/15 b/23 ~))
21+ ~zod/try=> =mal (mo (limo a+15 b+23 ~))
2122 ~zod/try=> ((cork ~(got by mal) dec) %a)
2223 14
2324 ~zod/try=> ((cork ~(got by mal) dec) %b)
@@ -40,9 +41,11 @@ Source
4041------
4142
4243 ++ corl :: compose backwards
43− |* [a=gate b=_,*]
44− |= c=_+<.b
44+ |* {a/gate b/_|=(* **)}
45+ =< +:|.((a (b))) :: span check
46+ |* c/_+<.b
4547 (a (b c))
48+ ::
4649
4750Examples
4851--------
@@ -62,9 +65,9 @@ Right curry a gate, binding the tail of its sample
6265Accepts
6366-------
6467
65−`a` is a [gate]().
68+`a` is a gate.
6669
67−`c` is a [noun]().
70+`c` is a noun.
6871
6972Produces
7073--------
@@ -73,10 +76,11 @@ Produces
7376Source
7477------
7578
76− ++ curr
77− |* [a=_|=(^ _*) c=*]
78− |* b=_+<+.a
79+ ++ curr :: curry right
80+ |* {a/_|=(^ **) c/*}
81+ |* b/_+<+.a
7982 (a b c)
83+ ::
8084
8185Examples
8286--------
@@ -97,22 +101,24 @@ Curry a gate, binding the head of its sample
97101Accepts
98102-------
99103
100−`a` is a [gate]().
104+`a` is a gate.
101105
102−`b` is a [noun]().
106+`b` is a noun.
103107
104108Produces
105109--------
106110
107−A [gate]().
111+A gate.
108112
109113Source
110114------
111115
112− ++ cury
113− |* [a=_|=(^ _*) b=*]
114− |* c=_+<+.a
116+ ++ cury :: curry left
117+ |* {a/_|=(^ **) b/*}
118+ |* c/_+<+.a
115119 (a b c)
120+ ::
121+
116122
117123Examples
118124--------
@@ -134,21 +140,20 @@ not.
134140Source
135141------
136142
137− ++ hard
138− |* han=$+(* *)
139− |= fud=* ^- han
140− ~| %hard
141− =+ gol=(han fud)
142− ?>(=(gol fud) gol)
143+ ++ cury :: curry left
144+ |* {a/_|=(^ **) b/*}
145+ |* c/_+<+.a
146+ (a b c)
147+ ::
143148
144149Examples
145150--------
146151
147152 ~zod/try=> ((hard (list)) (limo [1 2 3 ~]))
148153 ~[1 2 3]
149− ~zod/try=> ((hard ,@) (add 2 2))
154+ ~zod/try=> ((hard @) (add 2 2))
150155 4
151− ~zod/try=> ((hard ,@t) (crip "Tape to cord, bro!"))
156+ ~zod/try=> ((hard @t) (crip "Tape to cord, bro!"))
152157 'Tape to cord, bro'
153158 ~zod/try=> ((hard tape) (crip "...Tape to cord, bro?..."))
154159 ! hard
@@ -165,24 +170,25 @@ is not.
165170Source
166171------
167172
168− ++ soft
169− |* han=$+(* *)
170− |= fud=* ^- (unit han)
173+ ++ soft :: maybe coerce to span
174+ |* han/$-(* *)
175+ |= fud/* ^- (unit han)
171176 =+ gol=(han fud)
172177 ?.(=(gol fud) ~ [~ gol])
178+ ::
173179
174180Examples
175181--------
176182
177− ~zod/try=> ((soft ,%4) (add 2 2))
183+ ~zod/try=> ((soft %4) (add 2 2))
178184 [~ %4]
179− ~zod/try=> ((soft ,@) (add 2 2))
185+ ~zod/try=> ((soft @) (add 2 2))
180186 [~ 4]
181− ~zod/try=> ((soft ,%5) (add 2 2))
187+ ~zod/try=> ((soft %5) (add 2 2))
182188 ~
183− ~zod/try=> ((soft ,@t) (crip "Tape to cord, Woohoo!"))
189+ ~zod/try=> ((soft @t) (crip "Tape to cord, Woohoo!"))
184190 [~ 'Tape to cord, Woohoo!']
185− ~zod/try=> ((soft ,@t) (trip 'Cmon man... Tape to cord? Please?!'))
191+ ~zod/try=> ((soft @t) (trip 'Cmon man... Tape to cord? Please?!'))
186192 ~
187193
188194
docs/system/hoon/library/2o.md+27−25
@@ -2,17 +2,18 @@
22### `++jar`
33
44
5−Tile generator. A [`++jar`]() is a [`++map`]() of [`++list`]().
5+Tile generator. A `++jar` is a `++map` of `++list`.
66
77Source
88------
99
10− ++ jar |*([a=_,* b=_,*] (map a (list b))) :: map of lists
10+ ++ jar |*({a/$-(* *) b/$-(* *)} (map a (list b))) :: map of lists
11+
1112
1213Examples
1314--------
1415
15−See also: [`++ja`](), [`++by`](), [`++map`](), [`++list`]()
16+See also: `++ja`, `++by`, `++map`, `++list`
1617
1718 ~zod/try=> =a (limo [1 2 ~])
1819 ~zod/try=> a
@@ -33,12 +34,13 @@ See also: [`++ja`](), [`++by`](), [`++map`](), [`++list`]()
3334***
3435### `++jug`
3536
36−[mold]() generator. A `++jug` is a [`++map`]() of [`++set`]()s.
37+mold generator. A `++jug` is a `++map` of `++set`s.
3738
3839Source
3940------
4041
41− ++ jug |*([a=_,* b=_,*] (map a (set b))) :: map of sets
42+ ++ jug |*({a/$-(* *) b/$-(* *)} (map a (set b))) :: map of sets
43+
4244
4345Examples
4446--------
@@ -65,43 +67,43 @@ See also: `++ju`, `++by`, `++map`, `++set`
6567
6668Map
6769
68−[mold]() generator. A `++map` is a [treap](http://en.wikipedia.org/wiki/Treap) of
69−key, value pairs.
70+mold generator. A `++map` is a treap of
71+key-value pairs.
7072
7173
7274Source
7375------
7476
75− ++ map |* [a=_,* b=_,*] :: associative tree
77+ ++ map |* {a/$-(* *) b/$-(* *)} :: associative tree
78+ $@($~ {n/{p/a q/b} l/(map a b) r/(map a b)}) ::
79+
7680
7781Examples
7882--------
7983
80−See also: [`++by`]()
81−
82− ~zod/try=> :type; *(map ,@t ,@u)
83− {}
84− nlr([p=@t q=@u])
85− ~zod/try=> `(map ,@ta ,@ud)`(mo (limo a/1 b/2 ~))
86− {[p=~.a q=1] [p=~.b q=2]}
87−
84+See also: `++by`
8885
86+ ~zod/try=>? *(map @t @u)
87+ nlr({p/@t q/@u})
88+ {}
89+ ~zod/try=> (molt `(list (pair * *))`[[a+1 b+2] ~])
90+ {[p=[97 1] q=[98 2]]}
91+
8992
9093***
9194### `++qeu`
9295
9396Queue
9497
95−[mold]() generator. An ordered [treap](http://en.wikipedia.org/wiki/Treap) of
98+mold generator. An ordered [treap](http://en.wikipedia.org/wiki/Treap) of
9699items.
97100
98101Source
99102------
100103
101− ++ qeu |* a=_,* :: queue
102− $|(~ [n=a l=(qeu a) r=(qeu a)]) ::
104+ ++ qeu |* a/$-(* *) :: queue
105+ $@($~ {n/a l/(qeu a) r/(qeu a)}) ::
103106
104−See also: [`++to`]()
105107
106108Examples
107109--------
@@ -118,19 +120,19 @@ Examples
118120
119121Set
120122
121−[mold]() generator. A `++set` is a
122−[treap](http://en.wikipedia.org/wiki/Treap) with unique values.
123+mold generator. A `++set` is a treap with unique values.
123124
124125Source
125126------
126127
127− ++ set |* a=_,* :: set
128− $|(~ [n=a l=(set a) r=(set a)]) ::
128+ ++ set |* a/$-(* *) :: set
129+ $@($~ {n/a l/(set a) r/(set a)}) ::
130+
129131
130132Examples
131133--------
132134
133−See also: [`++in`]()
135+See also: `++in`
134136
135137 ~zod/try=> (sa "abc")
136138 {~~a ~~c ~~b}
docs/system/hoon/library/2p.md+16−15
@@ -8,24 +8,24 @@ Produces a noun unpacked from atom `a`. The inverse of jam.
88Accepts
99-------
1010
11−`a` is an [atom]().
11+`a` is an atom.
1212
1313Produces
1414--------
1515
16−A [`++noun`]().
16+A `++noun`.
1717
1818Source
1919------
2020
21− ++ cue :: unpack atom to noun
21+ ++ cue :: unpack
2222 ~/ %cue
23− |= a=@
23+ |= a/@
2424 ^- *
2525 =+ b=0
26− =+ m=`(map ,@ ,*)`~
26+ =+ m=`(map @ *)`~
2727 =< q
28− |- ^- [p=@ q=* r=_m]
28+ |- ^- {p/@ q/* r/(map @ *)}
2929 ?: =(0 (cut 0 [b 1] a))
3030 =+ c=(rub +(b) a)
3131 [+(p.c) q.c (~(put by m) b q.c)]
@@ -63,7 +63,7 @@ Produces an atom unpacked from noun `a`. The inverse of cue.
6363Accepts
6464-------
6565
66−`a` is a [noun]().
66+`a` is a noun.
6767
6868Produces
6969--------
@@ -75,12 +75,12 @@ Source
7575
7676 ++ jam :: pack
7777 ~/ %jam
78− |= a=*
78+ |= a/*
7979 ^- @
8080 =+ b=0
81− =+ m=`(map ,* ,@)`~
81+ =+ m=`(map * @)`~
8282 =< q
83− |- ^- [p=@ q=@ r=_m]
83+ |- ^- {p/@ q/@ r/(map * @)}
8484 =+ c=(~(get by m) a)
8585 ?~ c
8686 => .(m (~(put by m) a b))
@@ -135,16 +135,17 @@ A cell of two atoms, `p` and `q`.
135135Source
136136------
137137
138− ++ mat :: length-encode
138+ ++ mat :: length-encode
139139 ~/ %mat
140− |= a=@
141− ^- [p=@ q=@]
140+ |= a/@
141+ ^- {p/@ q/@}
142142 ?: =(0 a)
143143 [1 1]
144144 =+ b=(met 0 a)
145145 =+ c=(met 0 b)
146146 :- (add (add c c) b)
147147 (cat 0 (bex c) (mix (end 0 (dec c) b) (lsh 0 (dec c) a)))
148+ ::
148149
149150
150151Examples
@@ -196,8 +197,8 @@ Source
196197
197198 ++ rub :: length-decode
198199 ~/ %rub
199− |= [a=@ b=@]
200− ^- [p=@ q=@]
200+ |= {a/@ b/@}
201+ ^- {p/@ q/@}
201202 =+ ^= c
202203 =+ [c=0 m=(met 0 b)]
203204 |- ?< (gth c m)
docs/system/hoon/library/2q.md+34−59
@@ -3,14 +3,14 @@
33
44Char
55
6−A single character. [odor]() [`@tD`]() designates a single unicode byte. All
7−parsers consume [`++tape`]()s, which are lists of `++char`.
6+A single character. odor `@tD` designates a single unicode byte. All
7+parsers consume `++tape`s, which are lists of `++char`.
88
99
1010Source
1111------
1212
13− ++ char ,@tD :: UTF-8 byte
13+ ++ char @tD :: UTF-8 byte
1414
1515Examples
1616--------
@@ -27,19 +27,19 @@ Examples
2727
2828UTF-8 text
2929
30−One of Hoon's two string types (the other being [`++tape`]()). A cord is an
31−atom of UTF-8 text. [`++trip`]() and [`++crip`]() convert between cord and
30+One of Hoon's two string types (the other being `++tape`). A cord is an
31+atom of UTF-8 text. `++trip` and `++crip` convert between cord and
3232`++tape`.
3333
3434Source
3535------
3636
37− ++ cord ,@t :: text atom (UTF-8)
37+ ++ cord @t :: text atom (UTF-8)
3838
3939Examples
4040--------
4141
42−Odor [`@t`]() designates a Unicode atom, little-endian: the first character
42+Odor `@t` designates a Unicode atom, little-endian: the first character
4343in the text is the low byte.
4444
4545 ~zod/try=> `@ux`'foobar'
@@ -58,17 +58,18 @@ in the text is the low byte.
5858Point in time
5959
6060A boolean designating AD or BC, a year atom, a month
61−atom, and a [`++tarp`](), which is a day atom and a time.
61+atom, and a `++tarp`, which is a day atom and a time.
6262
6363Source
6464------
6565
66− ++ date ,[[a=? y=@ud] m=@ud t=tarp] :: parsed date
66+ ++ date {{a/? y/@ud} m/@ud t/tarp} :: parsed date
67+
6768
6869Examples
6970--------
7071
71−See also: [`++year`](), [`++yore`]() [`++stud`](), [`++dust`]()
72+See also: `++year`, `++yore` `++stud`, `++dust`
7273
7374 ~zod/try=> `date`(yore ~2014.6.6..21.09.15..0a16)
7475 [[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
@@ -96,16 +97,16 @@ list of `++tank` delimted by the strings in `p`.
9697Source
9798------
9899
99− ++ tank $% [%leaf p=tape] :: printing formats
100− $: %palm :: backstep list
101− p=[p=tape q=tape r=tape s=tape] ::
102− q=(list tank) ::
100+ ++ tank $% {$leaf p/tape} :: printing formats
101+ $: $palm :: backstep list
102+ p/{p/tape q/tape r/tape s/tape} ::
103+ q/(list tank) ::
103104 == ::
104− $: %rose :: flat list
105− p=[p=tape q=tape r=tape] :: mid open close
106− q=(list tank) ::
105+ $: $rose :: flat list
106+ p/{p/tape q/tape r/tape} :: mid open close
107+ q/(list tank) ::
107108 == ::
108− ==
109+ == ::
109110
110111Examples
111112--------
@@ -130,7 +131,7 @@ Examples
130131
131132List of chars
132133
133−One of Hoon's two string types, the other being [`++cord`](). A tape is a
134+One of Hoon's two string types, the other being `++cord`. A tape is a
134135list of chars.
135136
136137Source
@@ -152,18 +153,18 @@ Examples
152153
153154Day through second
154155
155−The remaining part of a [`++date`](): day, hour, minute, second and a list
156−of [`@ux`]() for precision.
156+The remaining part of a `++date`: day, hour, minute, second and a list
157+of `@ux` for precision.
157158
158159Source
159160------
160161
161− @ud h=@ud m=@ud s=@ud f=(list ,@ux)] :: parsed time
162+ ++ tarp {d/@ud h/@ud m/@ud s/@ud f/(list @ux)} :: parsed time
163+
162164
163165Examples
164166--------
165167
166−See also: [`++date`](), [`++yell`[]()/`++yule`]()
167168
168169 ~zod/try=> -<-
169170 ~2014.9.20..00.43.33..b52a
@@ -183,15 +184,15 @@ Hoon constants
183184
184185A restricted text atom for Hoon constants. The only characters permitted are
185186lowercase ASCII, `-`, and `0-9`, the latter two of which can neither be the first or last
186−character. The syntax for [`@tas`]() is the text itself, always preceded by `%`.
187−This means a term is always [cubical](). The empty `@tas` has a special syntax,
187+character. The syntax for `@tas` is the text itself, always preceded by `%`.
188+This means a term is always cubical. The empty `@tas` has a special syntax,
188189`$`.
189190
190191
191192Source
192193------
193194
194− ++ term ,@tas :: Hoon ASCII subset
195+ ++ term @tas :: Hoon ASCII subset
195196
196197Examples
197198--------
@@ -211,33 +212,13 @@ Examples
211212
212213 ++ wain (list cord) :: text lines (no \n)
213214
214−A list of lines. A `++wain` is used instead of a single [`++cord`]() with
215+A list of lines. A `++wain` is used instead of a single `++cord` with
215216`\n`.
216217
217−See also: [`++lore`](), [`++role`]()
218+See also: `++lore`, `++role`
218219
219220 ~zod/try=> `wain`/som/del/rok
220221 <|som del rok|>
221− ~zod/try=> `wain`(lore ^:@t/=main=/bin/tree/hoon)
222− <|
223− !:
224− :: /===/bin/tree/hoon
225− |= ^
226− |= [pax=path fla=$|(~ [%full ~])]
227− =- ~[te/-]~
228− =+ len=(lent pax)
229− =+ rend=?~(fla |=(a=path +:(spud (slag len a))) spud)
230− |- ^- wain
231− =+ ark=;;(arch .^(cy/pax))
232− =- ?~ q.ark -
233− [(crip (rend pax)) -]
234− %- zing
235− %- turn :_ |=(a=@t ^$(pax (weld pax `path`/[a])))
236− %- sort :_ aor
237− %- turn :_ |=([a=@t ~] a)
238− (~(tap by r.ark))
239− |>
240−
241222
242223
243224***
@@ -246,7 +227,7 @@ See also: [`++lore`](), [`++role`]()
246227List of lines
247228
248229
249−A `++wall` is used instead of a single [`++tape`]() with
230+A `++wall` is used instead of a single `++tape` with
250231`\n`.
251232
252233Source
@@ -257,20 +238,14 @@ Source
257238Examples
258239--------
259240
260−See also: [`++wash`]()
241+See also: `++wash`
261242
262− ~zod/try=> `wall`(wash [0 20] leaf/<(bex 256)>)
243+ ~zod/try=> `wall`(wash [0 20] leaf+<(bex 256)>)
263244 <<
264− "\/115.792.089.237.\/"
265− " 316.195.423.570."
266− " 985.008.687.907."
267− " 853.269.984.665."
268− " 640.564.039.457."
269− " 584.007.913.129."
270− " 639.936"
271− "\/ \/"
245+ "115.792.089.237.316.195.423.570.985.008.687.907.853.269.984.665.640.564.039.457.584.007.913.129.639.936"
272246 >>
273247
274248
275249
250+
276251***
docs/system/hoon/library/3a.md+99−97
@@ -1,45 +1,4 @@
11# 3a: signed and modular ints
2−### `++egcd`
3−
4−GCD
5−
6− ++ egcd :: schneier's egcd
7− |= [a=@ b=@]
8− =+ si
9− =+ [c=(sun a) d=(sun b)]
10− =+ [u=[c=(sun 1) d=--0] v=[c=--0 d=(sun 1)]]
11− |- ^- [d=@ u=@ v=@]
12− ?: =(--0 c)
13− [(abs d) d.u d.v]
14− :: ?> ?& =(c (sum (pro (sun a) c.u) (pro (sun b) c.v)))
15− :: =(d (sum (pro (sun a) d.u) (pro (sun b) d.v)))
16− :: ==
17− =+ q=(fra d c)
18− %= $
19− c (dif d (pro q c))
20− d c
21− u [(dif d.u (pro q c.u)) c.u]
22− v [(dif d.v (pro q c.v)) c.v]
23− ==
24− ::
25−
26−Greatest common denominator
27−
28− ~zod/try=> (egcd 20 15)
29− [d=5 u=2 v=1]
30− ~zod/try=> (egcd 24 16)
31− [d=8 u=2 v=1]
32− ~zod/try=> (egcd 7 5)
33− [d=1 u=3 v=6]
34− ~zod/try=> (egcd (shaf ~ %ham) (shaf ~ %sam))
35− [ d=1
36− u=59.983.396.314.566.203.239.184.568.129.921.874.787
37− v=38.716.650.351.034.402.960.165.718.823.532.275.722
38− ]
39−
40−
41−
42−***
432### `++fe` :: modulo bloq
443
454Modulo bloq
@@ -49,22 +8,22 @@ Core containing XX
498Accepts
509-------
5110
52−`a` is a [`++bloq`]().
11+`a` is a `++bloq`.
5312
5413Source
5514------
5615
57− |_ a=bloq
16+ |_ a=bloq
5817
5918### `++dif`
6019
61−Produces the difference between two [atom]()s in the modular basis
20+Produces the difference between two atoms in the modular basis
6221representation.
6322
6423Accepts
6524-------
6625
67−`a` is a [`++bloq`]().
26+`a` is a `++bloq`.
6827
6928`b` is an atom.
7029
@@ -73,12 +32,12 @@ Accepts
7332Produces
7433--------
7534
76−A [`@s`]()
35+A `@s`
7736
7837Source
7938------
8039
81− ++ dif |=([b=@ c=@] (sit (sub (add out (sit b)) (sit c))))
40+ ++ dif |=([b/@ c/@] (sit (sub (add out (sit b)) (sit c))))
8241
8342Examples
8443--------
@@ -111,7 +70,7 @@ Inverts the order of the modular field.
11170Accepts
11271-------
11372
114−`b` is a [`++bloq`]().
73+`b` is a `++bloq`.
11574
11675Produces
11776--------
@@ -122,7 +81,7 @@ An atom.
12281Source
12382------
12483
125− ++ inv |=(b=@ (sub (dec out) (sit b)))
84+ ++ inv |=(b/@ (sub (dec out) (sit b)))
12685
12786Examples
12887--------
@@ -151,17 +110,17 @@ Revereses bytes within block.
151110Accepts
152111-------
153112
154−`b` is a [`++bloq`]().
113+`b` is a `++bloq`.
155114
156115Produces
157116--------
158117
159−An atom.=
118+An atom.
160119
161120Source
162121------
163122
164− ++ net |= b=@ ^- @
123+ ++ net |= b/@ ^- @
165124 => .(b (sit b))
166125 ?: (lte a 3)
167126 b
@@ -231,12 +190,12 @@ The maximum integer value that the current block can store.
231190Accepts
232191-------
233192
234−A [`++bloq`]().
193+A `++bloq`.
235194
236195Produces
237196--------
238197
239−An [atom]().
198+An atom.
240199
241200Source
242201------
@@ -276,7 +235,7 @@ Roll `d` to the left by `c` `b`-sized blocks.
276235Accepts
277236-------
278237
279−`a` is a [`++bloq`]().
238+`a` is a `++bloq`.
280239
281240`b` is a `++bloq`.
282241
@@ -292,7 +251,7 @@ An atom.
292251Source
293252------
294253
295− ++ rol |= [b=bloq c=@ d=@] ^- @ :: roll left
254+ ++ rol |= [b/bloq c/@ d/@] ^- @ :: roll left
296255 =+ e=(sit d)
297256 =+ f=(bex (sub a b))
298257 =+ g=(mod c f)
@@ -323,11 +282,11 @@ Roll `d` to the right by `c` `b`-sized blocks.
323282Accepts
324283-------
325284
326−`a` is a [`++bloq`]().
285+`a` is a `++bloq`.
327286
328287`b` is a `++bloq`.
329288
330−`c` is an [atom]().
289+`c` is an atom.
331290
332291`d` is an atom.
333292
@@ -339,12 +298,13 @@ An atom.
339298Source
340299------
341300
342− ++ ror |= [b=bloq c=@ d=@] ^- @ :: roll right
301+ ++ ror |= {b/bloq c/@ d/@} ^- @ :: roll right
343302 =+ e=(sit d)
344303 =+ f=(bex (sub a b))
345304 =+ g=(mod c f)
346305 (sit (con (rsh b g e) (lsh b (sub f g) e)))
347306
307+
348308Examples
349309--------
350310
@@ -372,9 +332,9 @@ Sum two numbers in this modular field.
372332Accepts
373333-------
374334
375−`a` is a [`++bloq`]().
335+`a` is a `++bloq`.
376336
377−`b` is an [atom]().
337+`b` is an atom.
378338
379339`c` is an atom.
380340
@@ -386,7 +346,7 @@ An atom.
386346Source
387347------
388348
389− ++ sum |=([b=@ c=@] (sit (add b c))) :: wrapping add
349+ ++ sum |=([b/@ c/@] (sit (add b c))) :: wrapping add
390350
391351Examples
392352--------
@@ -410,12 +370,12 @@ Examples
410370
411371Atom in mod block representation
412372
413−Produce an [atom]() in the current modular block representation.
373+Produce an atom in the current modular block representation.
414374
415375Accepts
416376-------
417377
418−`a` is a [`++bloq`]().
378+`a` is a `++bloq`.
419379
420380`b` is an atom.
421381
@@ -427,7 +387,7 @@ An atom.
427387Source
428388------
429389
430− ++ sit |=(b=@ (end a 1 b)) :: enforce modulo
390+ ++ sit |=(b/@ (end a 1 b)) :: enforce modulo
431391
432392Examples
433393--------
@@ -476,17 +436,17 @@ Produces the absolute value of a signed integer.
476436Accepts
477437-------
478438
479−`a` is a signed integer, [`@s`]().
439+`a` is a signed integer, `@s`.
480440
481441Produces
482442--------
483443
484−An [atom]().
444+An atom.
485445
486446Source
487447------
488448
489− ++ abs |=(a=@s (add (end 0 1 a) (rsh 0 1 a))) :: absolute value
449+ ++ abs |=(a/@s (add (end 0 1 a) (rsh 0 1 a))) :: absolute value
490450
491451Examples
492452--------
@@ -509,20 +469,20 @@ Produces the difference between two signed integers `b` and `c`.
509469Accepts
510470-------
511471
512−`a` is a signed integer, [`@s`]().
472+`a` is a signed integer, `@s`.
513473
514474`b` is a signed integer, `@s`.
515475
516476Produces
517477--------
518478
519−A [`@s`]().
479+A `@s`.
520480
521481
522482Source
523483------
524484
525− ++ dif |= [a=@s b=@s] :: subtraction
485+ ++ dif |= [a/@s b/@s] :: subtraction
526486 (sum a (new !(syn b) (abs b)))
527487
528488Examples
@@ -550,7 +510,7 @@ Accepts
550510
551511`a` is a signed integer, `@s`.
552512
553−`b` is an [atom]().
513+`b` is an atom.
554514
555515Produces
556516--------
@@ -560,7 +520,7 @@ An atom.
560520Source
561521------
562522
563− ++ dul |= [a=@s b=@] :: modulus
523+ ++ dul |= [a/@s b/@] :: modulus
564524 =+(c=(old a) ?:(-.c (mod +.c b) (sub b +.c)))
565525
566526Examples
@@ -588,19 +548,19 @@ Produces the quotient of two signed integers.
588548Accepts
589549-------
590550
591−`a` is a signed integer, [`@s`].
551+`a` is a signed integer, `@s`.
592552
593553`b` is a signed integer, `@s`.
594554
595555Produces
596556--------
597557
598−An [atom]().
558+An atom.
599559
600560Source
601561------
602562
603− ++ fra |= [a=@s b=@s] :: divide
563+ ++ fra |= [a/@s b/@s] :: divide
604564 (new =(0 (mix (syn a) (syn b))) (div (abs a) (abs b)))
605565
606566Examples
@@ -617,7 +577,7 @@ Examples
617577
618578Signed integer
619579
620−Produces a signed integer from a loobean sign value `a` and an [atom]() `b`.
580+Produces a signed integer from a loobean sign value `a` and an atom `b`.
621581
622582Accepts
623583-------
@@ -629,12 +589,12 @@ Accepts
629589Produces
630590--------
631591
632−A [`@s`]()
592+A `@s`
633593
634594Source
635595------
636596
637− ++ new |= [a=? b=@] :: [sign value] to @s
597+ ++ new |= [a/? b/@] :: [sign value] to @s
638598 `@s`?:(a (mul 2 b) ?:(=(0 b) 0 +((mul 2 (dec b)))))
639599
640600Examples
@@ -651,24 +611,24 @@ Examples
651611
652612### `++old`
653613
654−[sign value]
614+sign value
655615
656616Produces the cell `[sign value]` representations of a signed integer.
657617
658618Accepts
659619-------
660620
661−`a` is a [`@s`]().
621+`a` is a `@s`.
662622
663623Produces
664624--------
665625
666−A cell of a boolean and an [atom]().
626+A cell of a boolean and an atom.
667627
668628Source
669629------
670630
671− ++ old |=(a=@s [(syn a) (abs a)]) :: [sign value]
631+ ++ old |=(a/@s [(syn a) (abs a)]) :: [sign value]
672632
673633Examples
674634--------
@@ -696,7 +656,7 @@ Produces the product of two signed integers.
696656Accepts
697657-------
698658
699−`a` is a [`@s`]().
659+`a` is a `@s`.
700660
701661`b` is a `@s`.
702662
@@ -708,7 +668,7 @@ A `@s`.
708668Source
709669------
710670
711− ++ pro |= [a=@s b=@s] :: multiplication
671+ ++ pro |= [a/@s b/@s] :: multiplication
712672 (new =(0 (mix (syn a) (syn b))) (mul (abs a) (abs b)))
713673
714674Examples
@@ -734,7 +694,7 @@ Produces the remainder from a division of two signed integers.
734694Accepts
735695-------
736696
737−`a` is a [`@s`]().
697+`a` is a `@s`.
738698
739699`b` is a `@s`.
740700
@@ -746,7 +706,7 @@ A `@sd`.
746706Source
747707------
748708
749− ++ rem |=([a=@s b=@s] (dif a (pro b (fra a b)))) :: remainder
709+ ++ rem |=([a/@s b/@s] (dif a (pro b (fra a b)))) :: remainder
750710
751711Examples
752712--------
@@ -773,7 +733,7 @@ Sum two signed integers.
773733Accepts
774734-------
775735
776−`b` is a [`@s`]().
736+`b` is a `@s`.
777737
778738`c` is a signed integer `@s`.
779739
@@ -785,7 +745,7 @@ A `@s`.
785745Source
786746------
787747
788− ++ sum |= [a=@s b=@s] :: addition
748+ ++ sum |= [a/@s b/@s] :: addition
789749 ~| %si-sum
790750 =+ [c=(old a) d=(old b)]
791751 ?: -.c
@@ -820,23 +780,23 @@ Signed from unsigned
820780
821781Produces a signed integer from an unsigned integer.
822782
823−Note that the result must be manually cast to some [`@s`]() odor to be
783+Note that the result must be manually cast to some `@s` odor to be
824784inferred as an unsigned integer in the type system.
825785
826786Accepts
827787-------
828788
829−`a` is a [`@u`]().
789+`a` is a `@u`.
830790
831791Produces
832792--------
833793
834−A [`@s`]().
794+A `@s`.
835795
836796Source
837797------
838798
839− ++ sun |=(a=@u (mul 2 a)) :: @u to @s
799+ ++ sun |=(a/@u (mul 2 a)) :: @u to @s
840800
841801Examples
842802--------
@@ -863,7 +823,7 @@ Produce the sign of a signed integer, where `&` is posiitve, and `|` is negative
863823Accepts
864824-------
865825
866−`a` is a [`@s`]().
826+`a` is a `@s`.
867827
868828Produces
869829--------
@@ -873,7 +833,7 @@ A boolean.
873833Source
874834------
875835
876− ++ syn |=(a=@s =(0 (end 0 1 a))) :: sign test
836+ ++ syn |=(a/@s =(0 (end 0 1 a))) :: sign test
877837
878838Examples
879839--------
@@ -896,7 +856,7 @@ Compare two signed integers.
896856Accepts
897857-------
898858
899−`b` is a [`@s`]().
859+`b` is a `@s`.
900860
901861`c` is a `@s`.
902862
@@ -908,7 +868,7 @@ A `@s`.
908868Source
909869------
910870
911− ++ cmp |= [a=@s b=@s] :: compare
871+ ++ cmp |= [a/@s b/@s] :: compare
912872 ^- @s
913873 ?: =(a b)
914874 --0
@@ -937,4 +897,46 @@ Examples
937897 -1
938898
939899
900+***
901+### `++egcd`
902+
903+GCD
904+
905+ ++ egcd !: :: schneier's egcd
906+ |= {a/@ b/@}
907+ =+ si
908+ =+ [c=(sun a) d=(sun b)]
909+ =+ [u=[c=(sun 1) d=--0] v=[c=--0 d=(sun 1)]]
910+ |- ^- {d/@ u/@s v/@s}
911+ ?: =(--0 c)
912+ [(abs d) d.u d.v]
913+ :: ?> ?& =(c (sum (pro (sun a) c.u) (pro (sun b) c.v)))
914+ :: =(d (sum (pro (sun a) d.u) (pro (sun b) d.v)))
915+ :: ==
916+ =+ q=(fra d c)
917+ %= $
918+ c (dif d (pro q c))
919+ d c
920+ u [(dif d.u (pro q c.u)) c.u]
921+ v [(dif d.v (pro q c.v)) c.v]
922+ ==
923+ ::
924+
925+
926+Greatest common denominator
927+
928+ ~zod/try=> (egcd 20 15)
929+ [d=5 u=2 v=1]
930+ ~zod/try=> (egcd 24 16)
931+ [d=8 u=2 v=1]
932+ ~zod/try=> (egcd 7 5)
933+ [d=1 u=3 v=6]
934+ ~zod/try=> (egcd (shaf ~ %ham) (shaf ~ %sam))
935+ [ d=1
936+ u=59.983.396.314.566.203.239.184.568.129.921.874.787
937+ v=38.716.650.351.034.402.960.165.718.823.532.275.722
938+ ]
939+
940+
941+
940942***
docs/system/hoon/library/3c.md+286−279
@@ -1,4 +1,262 @@
11# 3c: urbit time
2+### `++yo`
3+
4+ ++ yo :: time constants core
5+
6+Useful constants for interacting with earth time.
7+
8+### `++cet`
9+
10+Days in a century. Derived by multiplying the number of days in a year
11+(365) by the number of years in a century (100), then adding the number
12+days from leap years in a century (24).
13+
14+Produces
15+--------
16+
17+An atom.
18+
19+Source
20+------
21+
22+ |% ++ cet 36.524 :: (add 24 (mul 100 365))
23+
24+Examples
25+--------
26+
27+ ~zod/try=> cet:yo
28+ 36.524
29+ ~zod/try=> (add 365 cet:yo)
30+ 36.889
31+ ~zod/try=> (sub (add 24 (mul 100 365)) cet:yo)
32+ 0
33+
34+------------------------------------------------------------------------
35+
36+### `++day`
37+
38+Number of seconds in a day.
39+
40+Produces
41+--------
42+
43+An atom.
44+
45+Source
46+------
47+
48+ ++ day 86.400 :: (mul 24 hor)
49+
50+Examples
51+--------
52+
53+ ~zod/try=> day:yo
54+ 86.400
55+ ~zod/try=> (add 60 day:yo)
56+ 86.460
57+
58+------------------------------------------------------------------------
59+
60+### `++era`
61+
62+XX Revisit
63+
64+Produces
65+--------
66+
67+An atom.
68+
69+Source
70+------
71+
72+ ++ era 146.097 :: (add 1 (mul 4 cet))
73+
74+Examples
75+--------
76+
77+
78+------------------------------------------------------------------------
79+
80+### `++hor`
81+
82+Seconds in hour
83+
84+The number of seconds in an hour. Derived by multiplying the number of
85+seconds in a minute by the minutes in an hour.
86+
87+Produces
88+--------
89+
90+An atom.
91+
92+Source
93+------
94+
95+ ++ hor 3.600 :: (mul 60 mit)
96+
97+Examples
98+--------
99+
100+ ~zod/try=> hor:yo
101+ 3.600
102+ ~zod/try=> (div hor:yo 60)
103+ 60
104+
105+------------------------------------------------------------------------
106+
107+### `++jes`
108+
109+XX Revisit
110+
111+Produces
112+--------
113+
114+An atom.
115+
116+Source
117+------
118+
119+ ++ jes 106.751.991.084.417 :: (mul 730.692.561 era)
120+
121+Examples
122+--------
123+
124+ ~zod/try=> jes:yo
125+ 106.751.991.084.417
126+
127+------------------------------------------------------------------------
128+
129+### `++mit`
130+
131+Seconds in minute
132+
133+The number of seconds in a minute.
134+
135+Produces
136+--------
137+
138+An atom.
139+
140+Source
141+------
142+
143+ ++ mit 60
144+
145+Examples
146+--------
147+
148+ ~zod/try=> mit:yo
149+ 60
150+
151+------------------------------------------------------------------------
152+
153+### `++moh`
154+
155+Days in month
156+
157+The days in each month of the Gregorian common year. A list of unsigned
158+decimal atoms (Either 28, 30, or 31) denoting the number of days in the
159+month at the year at that index.
160+
161+Produces
162+--------
163+
164+A `++list` of `@ud`
165+
166+Source
167+------
168+
169+ ++ moh `(list @ud)`[31 28 31 30 31 30 31 31 30 31 30 31 ~]
170+
171+Examples
172+--------
173+
174+ ~zod/try=> moh:yo
175+ ~[31 28 31 30 31 30 31 31 30 31 30 31]
176+ ~zod/try=> (snag 4 moh:yo)
177+ 31
178+
179+------------------------------------------------------------------------
180+
181+### `++moy`
182+
183+Moh with leapyear
184+
185+The days in each month of the Gregorian leap-year. A list of unsigned
186+decimal atoms (Either 29,30, or 31) denoting the number of days in the
187+month at the leap-year at that index.
188+
189+Examples
190+--------
191+
192+A `++list` of `@ud`
193+
194+Source
195+------
196+
197+ ++ moy `(list @ud)`[31 29 31 30 31 30 31 31 30 31 30 31 ~]
198+
199+Examples
200+--------
201+
202+ ~zod/try=> moy:yo
203+ ~[31 29 31 30 31 30 31 31 30 31 30 31]
204+ ~zod/try=> (snag 1 moy:yo)
205+ 29
206+
207+------------------------------------------------------------------------
208+
209+### `++qad`
210+
211+Seconds in 4 years
212+
213+The number of seconds in four years. Derived by adding one second to the
214+number of seconds in four years.
215+
216+Produces
217+--------
218+
219+An atom.
220+
221+Source
222+------
223+
224+ ++ qad 126.144.001 :: (add 1 (mul 4 yer))
225+
226+Examples
227+--------
228+
229+ ~zod/try=> qad:yo
230+ 126.144.001
231+
232+------------------------------------------------------------------------
233+
234+### `++yer`
235+
236+Seconds in year
237+
238+The number of seconds in a year. Derived by multiplying the number of
239+seconds in a day by 365.
240+
241+Produces
242+--------
243+
244+An atom.
245+
246+Source
247+------
248+
249+ ++ yer 31.536.000 :: (mul 365 day)
250+
251+Examples
252+--------
253+
254+ ~zod/try=> yer:yo
255+ 31.536.000
256+
257+
258+
259+***
2260### `++yall`
3261
4262Time since beginning of time
@@ -18,10 +276,10 @@ Produces
18276Source
19277------
20278
21− ++ yall :: day # to day of year
22− |= day=@ud
23− ^- [y=@ud m=@ud d=@ud]
24− =+ [era=0 cet=0 lep=_?]
279+ ++ yall :: day / to day of year
280+ |= day/@ud
281+ ^- {y/@ud m/@ud d/@ud}
282+ =+ [era=0 cet=0 lep=*?]
25283 => .(era (div day era:yo), day (mod day era:yo))
26284 => ^+ .
27285 ?: (lth day +(cet:yo))
@@ -29,18 +287,19 @@ Source
29287 => .(lep |, cet 1, day (sub day +(cet:yo)))
30288 .(cet (add cet (div day cet:yo)), day (mod day cet:yo))
31289 =+ yer=(add (mul 400 era) (mul 100 cet))
32− |- ^- [y=@ud m=@ud d=@ud]
290+ |- ^- {y/@ud m/@ud d/@ud}
33291 =+ dis=?:(lep 366 365)
34292 ?. (lth day dis)
35293 =+ ner=+(yer)
36294 $(yer ner, day (sub day dis), lep =(0 (end 0 2 ner)))
37− |- ^- [y=@ud m=@ud d=@ud]
295+ |- ^- {y/@ud m/@ud d/@ud}
38296 =+ [mot=0 cah=?:(lep moy:yo moh:yo)]
39− |- ^- [y=@ud m=@ud d=@ud]
297+ |- ^- {y/@ud m/@ud d/@ud}
40298 =+ zis=(snag mot cah)
41299 ?: (lth day zis)
42300 [yer +(mot) +(day)]
43301 $(mot +(mot), day (sub day zis))
302+ ::
44303
45304Examples
46305--------
@@ -74,13 +333,13 @@ Accepts
74333Produces
75334--------
76335
77−A [`@ud`]().
336+A `@ud`.
78337
79338Source
80339------
81340
82341 ++ yawn :: days since Jesus
83− |= [yer=@ud mot=@ud day=@ud]
342+ |= {yer/@ud mot/@ud day/@ud}
84343 ^- @ud
85344 => .(mot (dec mot), day (dec day))
86345 => ^+ .
@@ -103,6 +362,7 @@ Source
103362 =+ nec=(sub yer 100)
104363 $(yer nec, day (add day ?:((yelp nec) 36.525 36.524)))
105364 (add day (mul (div yer 400) (add 1 (mul 4 36.524))))
365+ ::
106366
107367Examples
108368--------
@@ -125,25 +385,26 @@ its `@d`representation.
125385Accepts
126386-------
127387
128−`det` is a [`++date`]()
388+`det` is a `++date`
129389
130390Produces
131391--------
132392
133−A [`@d`]().
393+A `@d`.
134394
135395Source
136396------
137397
138398 ++ year :: date to @d
139− |= det=date
140− ^- @d
399+ |= det/date
400+ ^- @da
141401 =+ ^= yer
142402 ?: a.det
143403 (add 292.277.024.400 y.det)
144404 (sub 292.277.024.400 (dec y.det))
145405 =+ day=(yawn yer m.det d.t.det)
146406 (yule day h.t.det m.t.det s.t.det f.t.det)
407+ ::
147408
148409Examples
149410--------
@@ -164,12 +425,12 @@ Source
164425------
165426
166427 ++ yell :: tarp from @d
167− |= now=@d
428+ |= now/@d
168429 ^- tarp
169430 =+ sec=(rsh 6 1 now)
170431 =+ ^= fan
171432 =+ [muc=4 raw=(end 6 1 now)]
172− |- ^- (list ,@ux)
433+ |- ^- (list @ux)
173434 ?: |(=(0 raw) =(0 muc))
174435 ~
175436 => .(muc (dec muc))
@@ -181,6 +442,8 @@ Source
181442 =+ mit=(div sec mit:yo)
182443 => .(sec (mod sec mit:yo))
183444 [day hor mit sec fan]
445+ ::
446+
184447
185448Examples
186449--------
@@ -245,13 +508,13 @@ Accepts
245508Produces
246509--------
247510
248−A [`++date`]().
511+A `++date`.
249512
250513Source
251514------
252515
253516 ++ yore :: @d to date
254− |= now=@d
517+ |= now/@da
255518 ^- date
256519 =+ rip=(yell now)
257520 =+ ger=(yall d.rip)
@@ -259,6 +522,7 @@ Source
259522 [a=& y=(sub y.ger 292.277.024.400)]
260523 [a=| y=+((sub 292.277.024.400 y.ger))]
261524 [m.ger d.ger h.rip m.rip s.rip f.rip]
525+ ::
262526
263527Examples
264528--------
@@ -275,24 +539,24 @@ Examples
275539
276540Daily time to time atom
277541
278−Accept a [`++tarp`](/doc/hoon/library/1#++tarp), a parsed daily time, and produces a time atom,
542+Accept a `++tarp`, a parsed daily time, and produces a time atom,
279543`@d`.
280544
281545Accepts
282546-------
283547
284−`rip` is a [`++tarp`](/doc/hoon/library/1#++tarp).
548+`rip` is a `++tarp`.
285549
286550Produces
287551--------
288552
289−A [`@d`]().
553+A `@d`.
290554
291555Source
292556------
293557
294558 ++ yule :: time atom
295− |= rip=tarp
559+ |= rip/tarp
296560 ^- @d
297561 =+ ^= sec ;: add
298562 (mul d.rip day:yo)
@@ -307,6 +571,7 @@ Source
307571 => .(muc (dec muc))
308572 (add (lsh 4 muc i.f.rip) $(f.rip t.f.rip))
309573 (con (lsh 6 1 sec) fac)
574+ ::
310575
311576Examples
312577--------
@@ -327,262 +592,4 @@ Examples
327592
328593
329594
330−***
331−### `++yo`
332−
333− ++ yo :: time constants core
334−
335−Useful constants for interacting with earth time.
336−
337−### `++cet`
338−
339−Days in a century. Derived by multiplying the number of days in a year
340−(365) by the number of years in a century (100), then adding the number
341−days from leap years in a century (24).
342−
343−Produces
344−--------
345−
346−An [atom]().
347−
348−Source
349−------
350−
351− |% ++ cet 36.524 :: (add 24 (mul 100 365))
352−
353−Examples
354−--------
355−
356− ~zod/try=> cet:yo
357− 36.524
358− ~zod/try=> (add 365 cet:yo)
359− 36.889
360− ~zod/try=> (sub (add 24 (mul 100 365)) cet:yo)
361− 0
362−
363−------------------------------------------------------------------------
364−
365−### `++day`
366−
367−Number of seconds in a day.
368−
369−Produces
370−--------
371−
372−An [atom]().
373−
374−Source
375−------
376−
377− ++ day 86.400 :: (mul 24 hor)
378−
379−Examples
380−--------
381−
382− ~zod/try=> day:yo
383− 86.400
384− ~zod/try=> (add 60 day:yo)
385− 86.460
386−
387−------------------------------------------------------------------------
388−
389−### `++era`
390−
391−XX Revisit
392−
393−Produces
394−--------
395−
396−An [atom]().
397−
398−Source
399−------
400−
401− ++ era 146.097 :: (add 1 (mul 4 cet))
402−
403−Examples
404−--------
405−
406−
407−------------------------------------------------------------------------
408−
409−### `++hor`
410−
411−Seconds in hour
412−
413−The number of seconds in an hour. Derived by multiplying the number of
414−seconds in a minute by the minutes in an hour.
415−
416−Produces
417−--------
418−
419−An [atom]().
420−
421−Source
422−------
423−
424− ++ hor 3.600 :: (mul 60 mit)
425−
426−Examples
427−--------
428−
429− ~zod/try=> hor:yo
430− 3.600
431− ~zod/try=> (div hor:yo 60)
432− 60
433−
434−------------------------------------------------------------------------
435−
436−### `++jes`
437−
438−XX Revisit
439−
440−Produces
441−--------
442−
443−An atom.
444−
445−Source
446−------
447−
448− ++ jes 106.751.991.084.417 :: (mul 730.692.561 era)
449−
450−Examples
451−--------
452−
453− ~zod/try=> jes:yo
454− 106.751.991.084.417
455−
456−------------------------------------------------------------------------
457−
458−### `++mit`
459−
460−Seconds in minute
461−
462−The number of seconds in a minute.
463−
464−Produces
465−--------
466−
467−An [atom]().
468−
469−Source
470−------
471−
472− ++ mit 60
473−
474−Examples
475−--------
476−
477− ~zod/try=> mit:yo
478− 60
479−
480−------------------------------------------------------------------------
481−
482−### `++moh`
483−
484−Days in month
485−
486−The days in each month of the Gregorian common year. A list of unsigned
487−decimal atoms (Either 28, 30, or 31) denoting the number of days in the
488−month at the year at that index.
489−
490−Produces
491−--------
492−
493−A [`++list`]() of [`@ud`]()
494−
495−Source
496−------
497−
498− ++ moh `(list ,@ud)`[31 28 31 30 31 30 31 31 30 31 30 31 ~]
499−
500−Examples
501−--------
502−
503− ~zod/try=> moh:yo
504− ~[31 28 31 30 31 30 31 31 30 31 30 31]
505− ~zod/try=> (snag 4 moh:yo)
506− 31
507−
508−------------------------------------------------------------------------
509−
510−### `++moy`
511−
512−Moh with leapyear
513−
514−The days in each month of the Gregorian leap-year. A list of unsigned
515−decimal atoms (Either 29,30, or 31) denoting the number of days in the
516−month at the leap-year at that index.
517−
518−Examples
519−--------
520−
521−A [`++list`]() of [`@ud`]()
522−
523−Source
524−------
525−
526− ++ moy `(list ,@ud)`[31 29 31 30 31 30 31 31 30 31 30 31 ~]
527−
528−Examples
529−--------
530−
531− ~zod/try=> moy:yo
532− ~[31 29 31 30 31 30 31 31 30 31 30 31]
533− ~zod/try=> (snag 1 moy:yo)
534− 29
535−
536−------------------------------------------------------------------------
537−
538−### `++qad`
539−
540−Seconds in 4 years
541−
542−The number of seconds in four years. Derived by adding one second to the
543−number of seconds in four years.
544−
545−Produces
546−--------
547−
548−An [atom]().
549−
550−Source
551−------
552−
553− ++ qad 126.144.001 :: (add 1 (mul 4 yer))
554−
555−Examples
556−--------
557−
558− ~zod/try=> qad:yo
559− 126.144.001
560−
561−------------------------------------------------------------------------
562−
563−### `++yer`
564−
565−Seconds in year
566−
567−The number of seconds in a year. Derived by multiplying the number of
568−seconds in a day by 365.
569−
570−Produces
571−--------
572−
573−An [atom]().
574−
575−Source
576−------
577−
578− ++ yer 31.536.000 :: (mul 365 day)
579−
580−Examples
581−--------
582−
583− ~zod/try=> yer:yo
584− 31.536.000
585−
586−
587−
588595***
docs/system/hoon/library/3d.md+75−154
@@ -1,7 +1,65 @@
11# 3d: SHA hash family
2+
3+### `++og`
4+
5+ ++ og :: shax-powered rng
6+ ~/ %og
7+ |_ a/@
8+
9+XX document
10+
11+### `++rad`
12+
13+ ++ rad :: random in range
14+ |= b/@ ^- @
15+ =+ c=(raw (met 0 b))
16+ ?:((lth c b) c $(a +(a)))
17+ ::
18+
19+XX document
20+
21+### `++rads`
22+
23+ ++ rads :: random continuation
24+ |= b/@
25+ =+ r=(rad b)
26+ [r +>.$(a (shas %og-s r))]
27+
28+XX document
29+
30+### `++raw`
31+
32+ ++ raw :: random bits
33+ ~/ %raw
34+ |= b/@ ^- @
35+ %+ can
36+ 0
37+ =+ c=(shas %og-a (mix b a))
38+ |- ^- (list [@ @])
39+ ?: =(0 b)
40+ ~
41+ =+ d=(shas %og-b (mix b (mix a c)))
42+ ?: (lth b 256)
43+ [[b (end 0 b d)] ~]
44+ [[256 d] $(c d, b (sub b 256))]
45+
46+XX document
47+
48+### `++raws`
49+
50+ ++ raws :: random bits continuation
51+ |= b/@
52+ =+ r=(raw b)
53+ [r +>.$(a (shas %og-s r))]
54+ --
55+
56+
57+
58+***
259### `++shad`
360
4− ++ shad |=(ruz=@ (shax (shax ruz))) :: double sha-256
61+ ++ shad |=(ruz/@ (shax (shax ruz))) :: double sha-256
62+
563
664XX document
765
@@ -11,7 +69,7 @@ XX document
1169### `++shaf`
1270
1371 ++ shaf :: half sha-256
14− |= [sal=@ ruz=@]
72+ |= [sal/@ ruz/@]
1573 =+ haz=(shas sal ruz)
1674 (mix (end 7 1 haz) (rsh 7 1 haz))
1775 ::
@@ -24,7 +82,7 @@ XX document
2482### `++shak`
2583
2684 ++ shak :: XX shd be PBKDF
27− |= [who=@p wud=@]
85+ |= [who/@p wud/@]
2886 (shas (mix %shak who) wud)
2987 ::
3088
@@ -37,9 +95,9 @@ XX document
3795
3896 ++ shal :: sha-512 with length
3997 ~/ %shal
40− |= [len=@ ruz=@] ^- @
98+ |= {len/@ ruz/@} ^- @
4199 => .(ruz (cut 3 [0 len] ruz))
42− =+ [few==>(fe .(a 6)) wac=|=([a=@ b=@] (cut 6 [a 1] b))]
100+ =+ [few==>(fe .(a 6)) wac=|=({a/@ b/@} (cut 6 [a 1] b))]
43101 =+ [sum=sum.few ror=ror.few net=net.few inv=inv.few]
44102 =+ ral=(lsh 0 3 len)
45103 =+ ^= ful
@@ -156,7 +214,7 @@ XX document
156214### `++sham`
157215
158216 ++ sham :: noun hash
159− |= yux=* ^- @uvH ^- @
217+ |= yux/* ^- @uvH ^- @
160218 ?@ yux
161219 (shaf %mash yux)
162220 (shaf %sham (jam yux))
@@ -170,8 +228,8 @@ XX document
170228### `++shan`
171229
172230 ++ shan :: sha-1 (deprecated)
173− |= ruz=@
174− =+ [few==>(fe .(a 5)) wac=|=([a=@ b=@] (cut 5 [a 1] b))]
231+ |= ruz/@
232+ =+ [few==>(fe .(a 5)) wac=|=({a/@ b/@} (cut 5 [a 1] b))]
175233 =+ [sum=sum.few ror=ror.few rol=rol.few net=net.few inv=inv.few]
176234 =+ ral=(lsh 0 3 (met 3 ruz))
177235 =+ ^= ful
@@ -234,6 +292,7 @@ XX document
234292 :(sum (rol 0 5 a) fz e (wac 2 kbx) (wac j wox))
235293 :(sum (rol 0 5 a) fy e (wac 3 kbx) (wac j wox))
236294 $(j +(j), a tem, b a, c (rol 0 30 b), d c, e d)
295+ ::
237296
238297XX document
239298
@@ -243,7 +302,7 @@ XX document
243302### `++shas`
244303
245304 ++ shas :: salted hash
246− |= [sal=@ ruz=@]
305+ |= [sal/@ ruz/@]
247306 (shax (mix sal (shax ruz)))
248307 ::
249308
@@ -255,7 +314,7 @@ XX document
255314### `++shaw`
256315
257316 ++ shaw :: hash to nbits
258− |= [sal=@ len=@ ruz=@]
317+ |= [sal/@ len/@ ruz/@]
259318 (~(raw og (shas sal (mix len ruz))) len)
260319 ::
261320
@@ -264,92 +323,11 @@ XX document
264323***
265324### `++shax`
266325
267− ++ shax :: sha-256
268− ~/ %shax
269− |= ruz=@ ^- @
270− ~| %sha
271− =+ [few==>(fe .(a 5)) wac=|=([a=@ b=@] (cut 5 [a 1] b))]
272− =+ [sum=sum.few ror=ror.few net=net.few inv=inv.few]
273− =+ ral=(lsh 0 3 (met 3 ruz))
274− =+ ^= ful
275− %+ can 0
276− :~ [ral ruz]
277− [8 128]
278− [(mod (sub 960 (mod (add 8 ral) 512)) 512) 0]
279− [64 (~(net fe 6) ral)]
280− ==
281− =+ lex=(met 9 ful)
282− =+ ^= kbx 0xc671.78f2.bef9.a3f7.a450.6ceb.90be.fffa.
283− 8cc7.0208.84c8.7814.78a5.636f.748f.82ee.
284− 682e.6ff3.5b9c.ca4f.4ed8.aa4a.391c.0cb3.
285− 34b0.bcb5.2748.774c.1e37.6c08.19a4.c116.
286− 106a.a070.f40e.3585.d699.0624.d192.e819.
287− c76c.51a3.c24b.8b70.a81a.664b.a2bf.e8a1.
288− 9272.2c85.81c2.c92e.766a.0abb.650a.7354.
289− 5338.0d13.4d2c.6dfc.2e1b.2138.27b7.0a85.
290− 1429.2967.06ca.6351.d5a7.9147.c6e0.0bf3.
291− bf59.7fc7.b003.27c8.a831.c66d.983e.5152.
292− 76f9.88da.5cb0.a9dc.4a74.84aa.2de9.2c6f.
293− 240c.a1cc.0fc1.9dc6.efbe.4786.e49b.69c1.
294− c19b.f174.9bdc.06a7.80de.b1fe.72be.5d74.
295− 550c.7dc3.2431.85be.1283.5b01.d807.aa98.
296− ab1c.5ed5.923f.82a4.59f1.11f1.3956.c25b.
297− e9b5.dba5.b5c0.fbcf.7137.4491.428a.2f98
298− =+ ^= hax 0x5be0.cd19.1f83.d9ab.9b05.688c.510e.527f.
299− a54f.f53a.3c6e.f372.bb67.ae85.6a09.e667
300− =+ i=0
301− |- ^- @
302− ?: =(i lex)
303− (rep 5 (turn (rip 5 hax) net))
304− =+ ^= wox
305− =+ dux=(cut 9 [i 1] ful)
306− =+ wox=(rep 5 (turn (rip 5 dux) net))
307− =+ j=16
308− |- ^- @
309− ?: =(64 j)
310− wox
311− =+ :* l=(wac (sub j 15) wox)
312− m=(wac (sub j 2) wox)
313− n=(wac (sub j 16) wox)
314− o=(wac (sub j 7) wox)
315− ==
316− =+ x=:(mix (ror 0 7 l) (ror 0 18 l) (rsh 0 3 l))
317− =+ y=:(mix (ror 0 17 m) (ror 0 19 m) (rsh 0 10 m))
318− =+ z=:(sum n x o y)
319− $(wox (con (lsh 5 j z) wox), j +(j))
320− =+ j=0
321− =+ :* a=(wac 0 hax)
322− b=(wac 1 hax)
323− c=(wac 2 hax)
324− d=(wac 3 hax)
325− e=(wac 4 hax)
326− f=(wac 5 hax)
327− g=(wac 6 hax)
328− h=(wac 7 hax)
329− ==
330− |- ^- @
331− ?: =(64 j)
332− %= ^$
333− i +(i)
334− hax %+ rep 5
335− :~ (sum a (wac 0 hax))
336− (sum b (wac 1 hax))
337− (sum c (wac 2 hax))
338− (sum d (wac 3 hax))
339− (sum e (wac 4 hax))
340− (sum f (wac 5 hax))
341− (sum g (wac 6 hax))
342− (sum h (wac 7 hax))
343− ==
344− ==
345− =+ l=:(mix (ror 0 2 a) (ror 0 13 a) (ror 0 22 a)) :: s0
346− =+ m=:(mix (dis a b) (dis a c) (dis b c)) :: maj
347− =+ n=(sum l m) :: t2
348− =+ o=:(mix (ror 0 6 e) (ror 0 11 e) (ror 0 25 e)) :: s1
349− =+ p=(mix (dis e f) (dis (inv e) g)) :: ch
350− =+ q=:(sum h o p (wac j kbx) (wac j wox)) :: t1
351− $(j +(j), a (sum q n), b a, c b, d c, e (sum d q), f e, g f, h g)
352− ::
326+++ shax :: sha-256
327+ ~/ %shax
328+ |= ruz/@ ^- @
329+ (shay [(met 3 ruz) ruz])
330+::
353331
354332XX document
355333
@@ -359,66 +337,9 @@ XX document
359337### `++shaz`
360338
361339 ++ shaz :: sha-512
362− |= ruz=@ ^- @
340+ |= ruz/@ ^- @
363341 (shal [(met 3 ruz) ruz])
364342
365343
366344
367−***
368−
369−### `++og`
370−
371− ++ og :: shax-powered rng
372− ~/ %og
373− |_ a=@
374−
375−XX document
376−
377−### `++rad`
378−
379− ++ rad :: random in range
380− |= b=@ ^- @
381− =+ c=(raw (met 0 b))
382− ?:((lth c b) c $(a +(a)))
383− ::
384−
385−XX document
386−
387−### `++rads`
388−
389− ++ rads :: random continuation
390− |= b=@
391− =+ r=(rad b)
392− [r +>.$(a (shas %og-s r))]
393−
394−XX document
395−
396−### `++raw`
397−
398− ++ raw :: random bits
399− ~/ %raw
400− |= b=@ ^- @
401− %+ can
402− 0
403− =+ c=(shas %og-a (mix b a))
404− |- ^- (list ,[@ @])
405− ?: =(0 b)
406− ~
407− =+ d=(shas %og-b (mix b (mix a c)))
408− ?: (lth b 256)
409− [[b (end 0 b d)] ~]
410− [[256 d] $(c d, b (sub b 256))]
411−
412−XX document
413−
414−### `++raws`
415−
416− ++ raws :: random bits continuation
417− |= b=@
418− =+ r=(raw b)
419− [r +>.$(a (shas %og-s r))]
420− --
421−
422−
423−
424345***
docs/system/hoon/library/3e.md+13−67
@@ -11,7 +11,7 @@ XX document
1111
1212 ++ en :: ECB enc
1313 ~/ %en
14− |= [a=@I b=@H] ^- @uxH
14+ |= [a/@I b/@H] ^- @uxH
1515 =+ ahem
1616 (be & (ex a) b)
1717
@@ -21,7 +21,7 @@ XX document
2121
2222 ++ de :: ECB dec
2323 ~/ %de
24− |= [a=@I b=@H] ^- @uxH
24+ |= [a/@I b/@H] ^- @uxH
2525 =+ ahem
2626 (be | (ix (ex a)) b)
2727 --
@@ -30,8 +30,6 @@ XX document
3030
3131### `++ahem`
3232
33− ++ ahem :: AES helpers
34− :: XX should be in aesc, isn't for performance reasons
3533 =>
3634 =+ =+ [gr=(ga 8 0x11b 3) few==>(fe .(a 5))]
3735 =+ [pro=pro.gr dif=dif.gr pow=pow.gr ror=ror.few]
@@ -45,65 +43,32 @@ XX document
4543 ++ cipa :: AES params
4644 $_ ^? |%
4745
46+
4847XX document
4948
5049### `++co`
5150
52− ++ co [0xe 0xb 0xd 0x9]
51+ ++ co *{p/@ q/@ r/@ s/@} :: col coefs
5352
5453XX document
5554
5655### `++ix`
5756
58− ++ ix :: key expand, inv
59− |= a=@ ^- @
60− =+ [i=1 j=_@ b=_@ c=co:pin]
61− |-
62− ?: =(nnr i)
63− a
64− => .(b (cut 7 [i 1] a))
65− => .(b (rep 5 (mcol (pode 5 4 b) c)))
66− => .(j (sub nnr i))
67− %= $
68− i +(i)
69− a
70− %+ can 7
71− :~ [i (cut 7 [0 i] a)]
72− [1 b]
73− [j (cut 7 [+(i) j] a)]
74− ==
75− ==
76− --
77− ::
57+ ++ ix |~(a/@ *@) :: key index
58+
7859
7960XX document
8061
8162### `++ro`
8263
83− ++ ro [0 3 2 1]
64+ ++ ro *{p/@ q/@ r/@ s/@} :: row shifts
65+
8466
8567XX document
8668
8769### `++su`
8870
89− ++ su 0x7d0c.2155.6314.69e1.26d6.77ba.7e04.2b17.
90− 6199.5383.3cbb.ebc8.b0f5.2aae.4d3b.e0a0.
91− ef9c.c993.9f7a.e52d.0d4a.b519.a97f.5160.
92− 5fec.8027.5910.12b1.31c7.0788.33a8.dd1f.
93− f45a.cd78.fec0.db9a.2079.d2c6.4b3e.56fc.
94− 1bbe.18aa.0e62.b76f.89c5.291d.711a.f147.
95− 6edf.751c.e837.f9e2.8535.ade7.2274.ac96.
96− 73e6.b4f0.cecf.f297.eadc.674f.4111.913a.
97− 6b8a.1301.03bd.afc1.020f.3fca.8f1e.2cd0.
98− 0645.b3b8.0558.e4f7.0ad3.bc8c.00ab.d890.
99− 849d.8da7.5746.155e.dab9.edfd.5048.706c.
100− 92b6.655d.cc5c.a4d4.1698.6886.64f6.f872.
101− 25d1.8b6d.49a2.5b76.b224.d928.66a1.2e08.
102− 4ec3.fa42.0b95.4cee.3d23.c2a6.3294.7b54.
103− cbe9.dec4.4443.8e34.87ff.2f9b.8239.e37c.
104− fbd7.f381.9ea3.40bf.38a5.3630.d56a.0952
105− --
106− ::
71+ ++ su *@ :: s-box
10772
10873XX document
10974
@@ -117,38 +82,19 @@ XX document
11782
11883### `++co`
11984
120− ++ co [0xe 0xb 0xd 0x9]
85+ ++ co [0x2 0x3 1 1]
12186
12287XX document
12388
12489### `++ix`
12590
126− ++ ix :: key expand, inv
127− |= a=@ ^- @
128− =+ [i=1 j=_@ b=_@ c=co:pin]
129− |-
130− ?: =(nnr i)
131− a
132− => .(b (cut 7 [i 1] a))
133− => .(b (rep 5 (mcol (pode 5 4 b) c)))
134− => .(j (sub nnr i))
135− %= $
136− i +(i)
137− a
138− %+ can 7
139− :~ [i (cut 7 [0 i] a)]
140− [1 b]
141− [j (cut 7 [+(i) j] a)]
142− ==
143− ==
144− --
145− ::
146−
91+ ++ ix |~(a/@ *@) :: key index
92+
14793XX document
14894
14995### `++ro`
15096
151− ++ ro [0 3 2 1]
97+ ++ ro *{p/@ q/@ r/@ s/@} :: row shifts
15298
15399XX document
154100
docs/system/hoon/library/3f.md+84−73
@@ -31,20 +31,23 @@ An atom.
3131Source
3232------
3333
34− ++ feen :: conceal structure v2
35− |= pyn=@ ^- @
36− ?: &((gte pyn 0x1.0000) (lte pyn 0xffff.ffff))
37− (add 0x1.0000 (fice (sub pyn 0x1.0000)))
38− ?: &((gte pyn 0x1.0000.0000) (lte pyn 0xffff.ffff.ffff.ffff))
39− =+ lo=(dis pyn 0xffff.ffff)
40− =+ hi=(dis pyn 0xffff.ffff.0000.0000)
41− %+ con hi
42− (add 0x1.0000 (fice (sub lo 0x1.0000)))
43− pyn
34+ ++ feen :: conceal structure v2
35+ |= pyn/@ ^- @
36+ ?: &((gte pyn 0x1.0000) (lte pyn 0xffff.ffff))
37+ (add 0x1.0000 (fice (sub pyn 0x1.0000)))
38+ ?: &((gte pyn 0x1.0000.0000) (lte pyn 0xffff.ffff.ffff.ffff))
39+ =+ lo=(dis pyn 0xffff.ffff)
40+ =+ hi=(dis pyn 0xffff.ffff.0000.0000)
41+ %+ con hi
42+ (add 0x1.0000 (fice (sub lo 0x1.0000)))
43+ pyn
44+ ::
45+
4446
4547Examples
4648--------
4749
50+XX
4851
4952------------------------------------------------------------------------
5053
@@ -55,7 +58,7 @@ XX
5558Randomly permutes atoms that fit into 17 to 32 bits into one another, and
5659randomly permutes the low 32 bits of atoms that fit into 33 to 64 bits;
5760otherwise, passes the atom through unchanged. The permutation is the inverse of
58−the one applied by [`++feen`]().
61+the one applied by `++feen`.
5962
6063Accepts
6164-------
@@ -70,16 +73,17 @@ An atom.
7073Source
7174------
7275
73− ++ fend :: restore structure v2
74− |= cry=@ ^- @
75− ?: &((gte cry 0x1.0000) (lte cry 0xffff.ffff))
76− (add 0x1.0000 (teil (sub cry 0x1.0000)))
77− ?: &((gte cry 0x1.0000.0000) (lte cry 0xffff.ffff.ffff.ffff))
78− =+ lo=(dis cry 0xffff.ffff)
79− =+ hi=(dis cry 0xffff.ffff.0000.0000)
80− %+ con hi
81− (add 0x1.0000 (teil (sub lo 0x1.0000)))
82− cry
76+ ++ fend :: restore structure v2
77+ |= cry/@ ^- @
78+ ?: &((gte cry 0x1.0000) (lte cry 0xffff.ffff))
79+ (add 0x1.0000 (teil (sub cry 0x1.0000)))
80+ ?: &((gte cry 0x1.0000.0000) (lte cry 0xffff.ffff.ffff.ffff))
81+ =+ lo=(dis cry 0xffff.ffff)
82+ =+ hi=(dis cry 0xffff.ffff.0000.0000)
83+ %+ con hi
84+ (add 0x1.0000 (teil (sub lo 0x1.0000)))
85+ cry
86+ ::
8387
8488Examples
8589--------
@@ -90,7 +94,6 @@ Examples
9094
9195XX
9296
93−Applies a 3-round Feistel-like cipher to randomly permute atoms in the range `0` to `2^32 - 2^16`. The construction given in Black and Rogaway is ideal for a domain with a size of that form, and as with a conventionel Feistel cipher, three rounds suffice to make the permutation pseudorandom.
9497
9598Accepts
9699-------
@@ -105,15 +108,17 @@ An atom.
105108Source
106109------
107110
108− ++ fice :: adapted from
109− |= nor=@ :: black and rogaway
110− ^- @ :: "ciphers with
111− =+ ^= sel :: arbitrary finite
112− %+ rynd 2 :: domains", 2002
113− %+ rynd 1
114− %+ rynd 0
115− [(mod nor 65.535) (div nor 65.535)]
116− (add (mul 65.535 -.sel) +.sel)
111+ ++ fice :: adapted from
112+ |= nor/@ :: black and rogaway
113+ ^- @ :: "ciphers with
114+ =+ ^= sel :: arbitrary finite
115+ %+ rynd 2 :: domains", 2002
116+ %+ rynd 1
117+ %+ rynd 0
118+ [(mod nor 65.535) (div nor 65.535)]
119+ (add (mul 65.535 -.sel) +.sel)
120+ ::
121+
117122
118123Examples
119124--------
@@ -124,7 +129,7 @@ Examples
124129
125130XX
126131
127−Applies the reverse of the Feistel-like cipher applied by [`++fice`](). Unlike
132+Applies the reverse of the Feistel-like cipher applied by `++fice`. Unlike
128133a conventional Feistel cipher that is its own inverse if keys are used in
129134reverse order, this Feistel-like cipher uses two moduli that must be swapped
130135when applying the reverse transformation.
@@ -142,15 +147,18 @@ An atom.
142147Source
143148------
144149
145− ++ teil :: reverse ++fice
146− |= vip=@
147− ^- @
148− =+ ^= sel
149− %+ rund 0
150− %+ rund 1
151− %+ rund 2
152− [(mod vip 65.535) (div vip 65.535)]
153− (add (mul 65.535 -.sel) +.sel)
150+ ++ teil :: reverse ++fice
151+ |= vip/@
152+ ^- @
153+ =+ ^= sel
154+ %+ rund 0
155+ %+ rund 1
156+ %+ rund 2
157+ [(mod vip 65.535) (div vip 65.535)]
158+ (add (mul 65.535 -.sel) +.sel)
159+ ::
160+
161+
154162
155163Examples
156164--------
@@ -161,7 +169,7 @@ Examples
161169
162170XX
163171
164−A single round of the Feistel-like cipher [`++fice`](). AES ([`++aesc`]()) is
172+A single round of the Feistel-like cipher `++fice`. AES (`++aesc`) is
165173used as the round function.
166174
167175Accepts
@@ -178,7 +186,7 @@ Source
178186------
179187
180188 ++ rynd :: feistel round
181− |= [n=@ l=@ r=@]
189+ |= [n/@ l/@ r/@]
182190 ^- [@ @]
183191 :- r
184192 ?~ (mod n 2)
@@ -194,7 +202,7 @@ Examples
194202
195203XX
196204
197−A single round of the Feistel-like reverse cipher [`++teil`]().
205+A single round of the Feistel-like reverse cipher `++teil`.
198206
199207Accepts
200208-------
@@ -209,13 +217,13 @@ A cell of two atoms.
209217Source
210218------
211219
212− ++ rund :: reverse round
213− |= [n=@ l=@ r=@]
214− ^- [@ @]
215− :- r
216− ?~ (mod n 2)
217− (~(dif fo 65.535) l (en:aesc (snag n raku) r))
218− (~(dif fo 65.536) l (en:aesc (snag n raku) r))
220+ ++ rund :: reverse round
221+ |= {n/@ l/@ r/@}
222+ ^- {@ @}
223+ :- r
224+ ?~ (mod n 2)
225+ (~(dif fo 65.535) l (en:aesc (snag n raku) r))
226+ (~(dif fo 65.536) l (en:aesc (snag n raku) r))
219227
220228Examples
221229--------
@@ -230,12 +238,12 @@ XX
230238Accepts
231239-------
232240
233−A list of atoms of [odor]() [`@ux`]() (hexadecimal).
241+A list of atoms of odor `@ux` (hexadecimal).
234242
235243Produces
236244--------
237245
238−Arbitrary keys for use with [`++aesc`]().
246+Arbitrary keys for use with `++aesc`.
239247
240248Source
241249------
@@ -279,26 +287,28 @@ on the result, pushing it forward. Produces an atom.
279287Accepts
280288-------
281289
282−`pyn` is an [atom]().
290+`pyn` is an atom.
283291
284292
285293Produces
286294--------
287295
296+An atom.
297+
288298Source
289299------
290300
291301 ++ wren :: conceal structure
292− |= pyn=@ ^- @
302+ |= pyn/@ ^- @
293303 =+ len=(met 3 pyn)
294304 ?: =(0 len)
295305 0
296306 => .(len (dec len))
297307 =+ mig=(zaft (xafo len (cut 3 [len 1] pyn)))
298308 %+ can 3
299− %- flop ^- (list ,[@ @])
309+ %- flop ^- (list {@ @})
300310 :- [1 mig]
301− |- ^- (list ,[@ @])
311+ |- ^- (list {@ @})
302312 ?: =(0 len)
303313 ~
304314 => .(len (dec len))
@@ -306,6 +316,7 @@ Source
306316 [[1 mog] $(mig mog)]
307317 ::
308318
319+
309320Examples
310321--------
311322
@@ -329,7 +340,7 @@ on the result, pushing it forward. Produces an atom.
329340Accepts
330341-------
331342
332−`cry` is an [atom]().
343+`cry` is an atom.
333344
334345Produces
335346--------
@@ -338,16 +349,16 @@ Source
338349------
339350
340351 ++ wred :: restore structure
341− |= cry=@ ^- @
352+ |= cry/@ ^- @
342353 =+ len=(met 3 cry)
343354 ?: =(0 len)
344355 0
345356 => .(len (dec len))
346357 =+ mig=(cut 3 [len 1] cry)
347358 %+ can 3
348− %- flop ^- (list ,[@ @])
359+ %- flop ^- (list {@ @})
349360 :- [1 (xaro len (zart mig))]
350− |- ^- (list ,[@ @])
361+ |- ^- (list {@ @})
351362 ?: =(0 len)
352363 ~
353364 => .(len (dec len))
@@ -381,7 +392,7 @@ A cell of two atoms, `a` and `b`.
381392Source
382393------
383394
384− ++ xafo |=([a=@ b=@] +((mod (add (dec b) a) 255)))
395+ ++ xafo |=([a/@ b/@] +((mod (add (dec b) a) 255)))
385396
386397Examples
387398--------
@@ -413,7 +424,7 @@ An atom.
413424Source
414425------
415426
416− ++ xaro |=([a=@ b=@] +((mod (add (dec b) (sub 255 (mod a 255))) 255)))
427+ ++ xaro |=([a/@ b/@] +((mod (add (dec b) (sub 255 (mod a 255))) 255)))
417428
418429Examples
419430--------
@@ -429,7 +440,7 @@ Examples
429440
430441Look up in 255 sub box
431442
432−The inverse of [`++zart`](). Looks up a nonzero byte`a\` in a substiution
443+The inverse of `++zart`. Looks up a nonzero byte `a`in a substiution
433444box with 255 values, producing a unique nonzero byte.
434445
435446Accepts
@@ -447,7 +458,7 @@ Source
447458------
448459
449460 ++ zaft :: forward 255-sbox
450− |= a=@D
461+ |= a/@D
451462 =+ ^= b
452463 0xcc.75bc.86c8.2fb1.9a42.f0b3.79a0.92ca.21f6.1e41.cde5.fcc0.
453464 7e85.51ae.1005.c72d.1246.07e8.7c64.a914.8d69.d9f4.59c2.8038.
@@ -480,7 +491,7 @@ Examples
480491
481492Reverse look up in 255 sub box
482493
483−The inverse of [`++zaft`](). Looks up the index of a nonzero byte `a` in
494+The inverse of `++zaft`. Looks up the index of a nonzero byte `a` in
484495the substitution box with 255 values, producing a unique nonzero byte.
485496
486497Accepts
@@ -497,7 +508,7 @@ Source
497508------
498509
499510 ++ zart :: reverse 255-sbox
500− |= a=@D
511+ |= a/@D
501512 =+ ^= b
502513 0x68.4f07.ea1c.73c9.75c2.efc8.d559.5125.f621.a7a8.8591.5613.
503514 dd52.40eb.65a2.60b7.4bcb.1123.ceb0.1bd6.3c84.2906.b164.19b3.
@@ -527,13 +538,13 @@ Examples
527538
528539Lookup byte in 256 sub box
529540
530−The inverse of [`++zyrt`](). Looks up a byte `a` in a substituion box
541+The inverse of `++zyrt`. Looks up a byte `a` in a substituion box
531542with 256 values, producing a byte.
532543
533544Accepts
534545-------
535546
536−`a` is an [atom]() of one byte in length.
547+`a` is an atom of one byte in length.
537548
538549Produces
539550--------
@@ -544,7 +555,7 @@ Source
544555------
545556
546557 ++ zyft :: forward 256-sbox
547− |= a=@D
558+ |= a/@D
548559 =+ ^= b
549560 0xbb49.b71f.b881.b402.17e4.6b86.69b5.1647.115f.dddb.7ca5.
550561 8371.4bd5.19a9.b092.605d.0d9b.e030.a0cc.78ba.5706.4d2d.
@@ -577,13 +588,13 @@ Examples
577588
578589Reverse lookup byte in 256 sub box
579590
580−The inverse of [`++zyft`](/doc/hoon/library/2en#++zyft). Looks up a byte `a` in a substituion box
591+The inverse of `++zyft`. Looks up a byte `a` in a substituion box
581592with 256 values, producing a byte.
582593
583594Accepts
584595-------
585596
586−`a` is an [atom]() of one byte in length.
597+`a` is an atom of one byte in length.
587598
588599Produces
589600--------
@@ -594,7 +605,7 @@ Source
594605------
595606
596607 ++ zyrt :: reverse 256-sbox
597− |= a=@D
608+ |= a/@D
598609 =+ ^= b
599610 0x9fc8.2753.6e02.8fcf.8b35.2b20.5598.7caa.c9a9.30b0.9b48.
600611 47ce.6371.80f6.407d.00dd.0aa5.ed10.ecb7.0f5a.5c3a.e605.
docs/system/hoon/library/3g.md+39−24
@@ -4,14 +4,14 @@
44Noun literal syntax cases
55
66Noun literal syntax cases: atoms, jammed nouns, and nestable tuples.
7−Parsed and printed using [`++so`]() and [`++co`]() cores.
7+Parsed and printed using `++so` and `++co` cores.
88
99Source
1010------
1111
12− ++ coin $% [%$ p=dime] ::
13− [%blob p=*] ::
14− [%many p=(list coin)] ::
12+ ++ coin $% {$$ p/dime} ::
13+ {$blob p/*} ::
14+ {$many p/(list coin)} ::
1515 == ::
1616
1717Examples
@@ -41,15 +41,16 @@ Examples
4141
4242Odor-atom pair
4343
44−Used in [`++coin`](). Convenience methods [`++scot`]() and [`++scow`]() (in
45−Section 2eL) print dimes as [`++cord`]() and [`++tape`](), respectively.
46−[`++slat`](), [`++slav`](), and [`++slaw`]() are used to parse atoms of
47−specific [odor]()s.
44+Used in `++coin`. Convenience methods `++scot` and `++scow` (in
45+Section 2eL) print dimes as `++cord` and `++tape`, respectively.
46+`++slat`, `++slav`, and `++slaw` are used to parse atoms of
47+specific odors.
4848
4949Source
5050------
5151
52− ++ dime ,[p=@ta q=@] ::
52+ ++ dime {p/@ta q/@} ::
53+
5354
5455Examples
5556--------
@@ -69,12 +70,13 @@ Optional result `p` and parsing continuation `q`.
6970Source
7071------
7172
72− ++ edge ,[p=hair q=(unit ,[p=* q=nail])] :: parsing output
73+ ++ hair {p/@ud q/@ud} :: parsing trace
74+
7375
7476Examples
7577--------
7678
77−See also: Section 2eD, [`++rule`]()
79+See also: Section 2eD, `++rule`
7880
7981 ~zod/try=> *edge
8082 [p=[p=0 q=0] q=~]
@@ -93,7 +95,8 @@ A pair of two [`@ud`]() used in parsing indicating line and column number.
9395Source
9496------
9597
96− ++ hair ,[p=@ud q=@ud] :: parsing trace
98+ ++ hair {p/@ud q/@ud} :: parsing trace
99+
97100
98101Examples
99102--------
@@ -120,11 +123,15 @@ Mold generator for an edge
120123Source
121124------
122125
123− ++ like |* a=_,* :: generic edge
126+ ++ like |* a/$-(* *) :: generic edge
127+ |= b/_`*`[(hair) ~] ::
128+ :- p=(hair -.b) ::
129+ ^= q ::
124130 ?@ +.b ~ ::
125131 :- ~ ::
126132 u=[p=(a +>-.b) q=[p=(hair -.b) q=(tape +.b)]] ::
127133
134+
128135Examples
129136--------
130137 ~zod/try=> *(like char)
@@ -149,7 +156,8 @@ Indicates parsing position `p`, and remaining text to be parsed `q`.
149156Source
150157------
151158
152− ++ nail ,[p=hair q=tape] :: parsing input
159+ ++ nail {p/hair q/tape} :: parsing input
160+
153161
154162Examples
155163--------
@@ -165,13 +173,14 @@ Examples
165173
166174Filesystem path
167175
168−A `++path` is a list of [`++span`]()s aka [`@ta`](). Used in
176+A `++path` is a list of `++span`s aka `@ta`. Used in
169177`%clay` and `%eyre` extensively.
170178
171179Source
172180------
173181
174− ++ path (list span) :: filesys location
182+ ++ path (list knot) :: filesys location
183+
175184
176185Examples
177186--------
@@ -187,12 +196,13 @@ Examples
187196Parsing range
188197
189198Mostly used for stacktraces. A `++pint` is a pair of
190−[`++hair`](), indicating from `p` to `q`.
199+`++hair`, indicating from `p` to `q`.
191200
192201Source
193202------
194203
195− ++ pint ,[p=[p=@ q=@] q=[p=@ q=@]] :: line/column range
204+ ++ pint {p/{p/@ q/@} q/{p/@ q/@}} :: line+column range
205+
196206
197207Examples
198208--------
@@ -217,7 +227,8 @@ that parsing rules match this with `_`.
217227Source
218228------
219229
220− ++ rule |=(tub=nail `edge`[p.tub ~ ~ tub]) :: parsing rule
230+ ++ rule _|=(nail *edge) :: parsing rule
231+
221232
222233Examples
223234--------
@@ -239,12 +250,13 @@ Examples
239250
240251Stack trace line
241252
242−A [`++spot`]() is what we print after crashing.
253+A `++spot` is what we print after crashing.
243254
244255Source
245256------
246257
247− ++ spot ,[p=path q=pint] :: range in file
258+ ++ spot {p/path q/pint} :: range in file
259+
248260
249261Examples
250262--------
@@ -268,13 +280,16 @@ failure with stack trace (`%2`).
268280Source
269281------
270282
271− ++ toon $% [%0 p=*] :: success
283+ ++ toon $% {$0 p/*} :: success
284+ {$1 p/(list)} :: blocks
285+ {$2 p/(list tank)} :: stack trace
286+ == ::
287+
272288
273289Examples
274290--------
275− ~zod/try=> (mock [[20 21] 0 3] ,~)
291+ ~zod/try=> (mock [[20 21] 0 3] $~)
276292 [%0 p=21]
277−
278293 ~zod/try=> (mock [[0] !=(.^(cy//=main/1))] ,~)
279294 [%1 p=~[[31.075 1.685.027.454 1.852.399.981 49 0]]]
280295 ~zod/try=> (path [31.075 1.685.027.454 1.852.399.981 49 0])
docs/system/hoon/library/4a.md+55−52
@@ -1,43 +1,43 @@
11# 4a: exotic bases
22### `++po`
33
4−++ po
5− ~/ %po
6− =+ :- ^= sis :: prefix syllables
7− 'dozmarbinwansamlitsighidfidlissogdirwacsabwissib\
8− /rigsoldopmodfoglidhopdardorlorhodfolrintogsilmir\
9− /holpaslacrovlivdalsatlibtabhanticpidtorbolfosdot\
10− /losdilforpilramtirwintadbicdifrocwidbisdasmidlop\
11− /rilnardapmolsanlocnovsitnidtipsicropwitnatpanmin\
12− /ritpodmottamtolsavposnapnopsomfinfonbanporworsip\
13− /ronnorbotwicsocwatdolmagpicdavbidbaltimtasmallig\
14− /sivtagpadsaldivdactansidfabtarmonranniswolmispal\
15− /lasdismaprabtobrollatlonnodnavfignomnibpagsopral\
16− /bilhaddocridmocpacravripfaltodtiltinhapmicfanpat\
17− /taclabmogsimsonpinlomrictapfirhasbosbatpochactid\
18− /havsaplindibhosdabbitbarracparloddosbortochilmac\
19− /tomdigfilfasmithobharmighinradmashalraglagfadtop\
20− /mophabnilnosmilfopfamdatnoldinhatnacrisfotribhoc\
21− /nimlarfitwalrapsarnalmoslandondanladdovrivbacpol\
22− /laptalpitnambonrostonfodponsovnocsorlavmatmipfap'
23− ^= dex :: suffix syllables
24− 'zodnecbudwessevpersutletfulpensytdurwepserwylsun\
25− /rypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnex\
26− /lunmeplutseppesdelsulpedtemledtulmetwenbynhexfeb\
27− /pyldulhetmevruttylwydtepbesdexsefwycburderneppur\
28− /rysrebdennutsubpetrulsynregtydsupsemwynrecmegnet\
29− /secmulnymtevwebsummutnyxrextebfushepbenmuswyxsym\
30− /selrucdecwexsyrwetdylmynmesdetbetbeltuxtugmyrpel\
31− /syptermebsetdutdegtexsurfeltudnuxruxrenwytnubmed\
32− /lytdusnebrumtynseglyxpunresredfunrevrefmectedrus\
33− /bexlebduxrynnumpyxrygryxfeptyrtustyclegnemfermer\
34− /tenlusnussyltecmexpubrymtucfyllepdebbermughuttun\
35− /bylsudpemdevlurdefbusbeprunmelpexdytbyttyplevmyl\
36− /wedducfurfexnulluclennerlexrupnedlecrydlydfenwel\
37− /nydhusrelrudneshesfetdesretdunlernyrsebhulryllud\
38− /remlysfynwerrycsugnysnyllyndyndemluxfedsedbecmun\
39− /lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes'
40− |%
4+ ++ po
5+ ~/ %po
6+ =+ :- ^= sis :: prefix syllables
7+ 'dozmarbinwansamlitsighidfidlissogdirwacsabwissib\
8+ /rigsoldopmodfoglidhopdardorlorhodfolrintogsilmir\
9+ /holpaslacrovlivdalsatlibtabhanticpidtorbolfosdot\
10+ /losdilforpilramtirwintadbicdifrocwidbisdasmidlop\
11+ /rilnardapmolsanlocnovsitnidtipsicropwitnatpanmin\
12+ /ritpodmottamtolsavposnapnopsomfinfonbanporworsip\
13+ /ronnorbotwicsocwatdolmagpicdavbidbaltimtasmallig\
14+ /sivtagpadsaldivdactansidfabtarmonranniswolmispal\
15+ /lasdismaprabtobrollatlonnodnavfignomnibpagsopral\
16+ /bilhaddocridmocpacravripfaltodtiltinhapmicfanpat\
17+ /taclabmogsimsonpinlomrictapfirhasbosbatpochactid\
18+ /havsaplindibhosdabbitbarracparloddosbortochilmac\
19+ /tomdigfilfasmithobharmighinradmashalraglagfadtop\
20+ /mophabnilnosmilfopfamdatnoldinhatnacrisfotribhoc\
21+ /nimlarfitwalrapsarnalmoslandondanladdovrivbacpol\
22+ /laptalpitnambonrostonfodponsovnocsorlavmatmipfap'
23+ ^= dex :: suffix syllables
24+ 'zodnecbudwessevpersutletfulpensytdurwepserwylsun\
25+ /rypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnex\
26+ /lunmeplutseppesdelsulpedtemledtulmetwenbynhexfeb\
27+ /pyldulhetmevruttylwydtepbesdexsefwycburderneppur\
28+ /rysrebdennutsubpetrulsynregtydsupsemwynrecmegnet\
29+ /secmulnymtevwebsummutnyxrextebfushepbenmuswyxsym\
30+ /selrucdecwexsyrwetdylmynmesdetbetbeltuxtugmyrpel\
31+ /syptermebsetdutdegtexsurfeltudnuxruxrenwytnubmed\
32+ /lytdusnebrumtynseglyxpunresredfunrevrefmectedrus\
33+ /bexlebduxrynnumpyxrygryxfeptyrtustyclegnemfermer\
34+ /tenlusnussyltecmexpubrymtucfyllepdebbermughuttun\
35+ /bylsudpemdevlurdefbusbeprunmelpexdytbyttyplevmyl\
36+ /wedducfurfexnulluclennerlexrupnedlecrydlydfenwel\
37+ /nydhusrelrudneshesfetdesretdunlernyrsebhulryllud\
38+ /remlysfynwerrycsugnysnyllyndyndemluxfedsedbecmun\
39+ /lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes'
40+ |%
4141
4242Provides the phonetic syllables and name generators for the Urbit naming
4343system. The two faces, `sis` and `dex` are available to the arms
@@ -55,20 +55,20 @@ Produces the byte of the right-hand syllable `a`.
5555Accepts
5656-------
5757
58−`a` is an [atom]().
58+`a` is an atom.
5959
6060Produces
6161--------
6262
63−A [`++unit`]() of an atom.
63+A `++unit` of an atom.
6464
6565Source
6666------
6767
68− ++ ind ~/ %ind :: parse prefix
69− |= a=@
68+ ++ ind ~/ %ind :: parse suffix
69+ |= a/@tas
7070 =+ b=0
71− |- ^- (unit ,@)
71+ |- ^- (unit @)
7272 ?:(=(256 b) ~ ?:(=(a (tod b)) [~ b] $(b +(b))))
7373
7474Examples
@@ -92,21 +92,22 @@ Produces the byte of the left-hand phonetic syllable `b`.
9292Accepts
9393-------
9494
95−`a` is an [atom]().
95+`a` is an atom.
9696
9797Produces
9898--------
99−A [`++unit`]() of an atom.
99+A `++unit` of an atom.
100100
101101Source
102102------
103103
104− ++ ins ~/ %ins :: parse suffix
105− |= a=@
104+ ++ ins ~/ %ins :: parse prefix
105+ |= a/@tas
106106 =+ b=0
107− |- ^- (unit ,@)
107+ |- ^- (unit @)
108108 ?:(=(256 b) ~ ?:(=(a (tos b)) [~ b] $(b +(b))))
109109
110+
110111Examples
111112--------
112113
@@ -126,7 +127,7 @@ Examples
126127Fetch prefix
127128
128129Produces the phonetic prefix syllable from index `a` within `dex` as an
129−[atom]().
130+atom.
130131
131132Accepts
132133-------
@@ -142,8 +143,10 @@ An atom.
142143Source
143144------
144145
145− ++ tod ~/ %tod :: fetch prefix
146− |=(a=@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] dex)))
146+ ++ tod ~/ %tod :: fetch suffix
147+ |=(a/@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] dex)))
148+
149+
147150
148151Examples
149152--------
@@ -168,7 +171,7 @@ Examples
168171Fetch suffix
169172
170173Produces the phonetic prefix syllable from index `a` within `sis` as an
171−[atom]().
174+atom.
172175
173176Accepts
174177-------
@@ -184,7 +187,7 @@ Source
184187------
185188
186189 ++ tos ~/ %tos :: fetch suffix
187− |=(a=@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] sis)))
190+ |=(a/@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] sis)))
188191
189192Examples
190193--------
docs/system/hoon/library/4b.md+259−256
@@ -1,4 +1,154 @@
11# 4b: text processing
2+### `++at`
3+
4+ ++ at
5+ |_ a/@
6+
7+XX document
8+
9+### `++r`
10+
11+ ++ r
12+ ?: ?& (gte (met 3 a) 2)
13+ |-
14+ ?: =(0 a)
15+ &
16+ =+ vis=(end 3 1 a)
17+ ?& ?|(=('-' vis) ?&((gte vis 'a') (lte vis 'z')))
18+ $(a (rsh 3 1 a))
19+ ==
20+ ==
21+ rtam
22+ ?: (lte (met 3 a) 2)
23+ rud
24+ rux
25+ ::
26+
27+XX document
28+
29+### `++rf`
30+
31+ ++ rf `tape`[?-(a $& '&', $| '|', * !!) ~]
32+
33+
34+XX document
35+
36+### `++rn`
37+
38+ ++ rn `tape`[?>(=(0 a) '~') ~]
39+
40+XX document
41+
42+### `++rt`
43+
44+ ++ rt `tape`['\'' (weld (mesc (trip a)) `tape`['\'' ~])]
45+
46+XX document
47+
48+### `++rta`
49+
50+ ++ rta rt
51+
52+XX document
53+
54+### `++rtam`
55+
56+ ++ rtam `tape`['%' (trip a)]
57+
58+XX document
59+
60+### `++rub`
61+
62+ ++ rub `tape`['0' 'b' (rum 2 ~ |=(b/@ (add '0' b)))]
63+
64+XX document
65+
66+### `++rud`
67+
68+ ++ rud (rum 10 ~ |=(b/@ (add '0' b)))
69+
70+XX document
71+
72+### `++rum`
73+
74+ ++ rum
75+ |= {b/@ c/tape d/$-(@ @)}
76+ ^- tape
77+ ?: =(0 a)
78+ [(d 0) c]
79+ =+ e=0
80+ |- ^- tape
81+ ?: =(0 a)
82+ c
83+ =+ f=&(!=(0 e) =(0 (mod e ?:(=(10 b) 3 4))))
84+ %= $
85+ a (div a b)
86+ c [(d (mod a b)) ?:(f [?:(=(10 b) ',' '-') c] c)]
87+ e +(e)
88+ ==
89+ ::
90+
91+
92+XX document
93+
94+### `++rup`
95+
96+ ++ rup
97+ =+ b=(met 3 a)
98+ ^- tape
99+ :- '-'
100+ |- ^- tape
101+ ?: (gth (met 5 a) 1)
102+ %+ weld
103+ $(a (rsh 5 1 a), b (sub b 4))
104+ `tape`['-' '-' $(a (end 5 1 a), b 4)]
105+ ?: =(0 b)
106+ ['~' ~]
107+ ?: (lte b 1)
108+ (trip (tos:po a))
109+ |- ^- tape
110+ ?: =(2 b)
111+ =+ c=(rsh 3 1 a)
112+ =+ d=(end 3 1 a)
113+ (weld (trip (tod:po c)) (trip (tos:po (mix c d))))
114+ =+ c=(rsh 3 2 a)
115+ =+ d=(end 3 2 a)
116+ (weld ^$(a c, b (met 3 c)) `tape`['-' $(a (mix c d), b 2)])
117+ ::
118+
119+XX document
120+
121+### `++ruv`
122+
123+ ++ ruv
124+ ^- tape
125+ :+ '0'
126+ 'v'
127+ %^ rum
128+ 64
129+ ~
130+ |= b/@
131+ ?: =(63 b)
132+ '+'
133+ ?: =(62 b)
134+ '-'
135+ ?:((lth b 26) (add 65 b) ?:((lth b 52) (add 71 b) (sub b 4)))
136+ ::
137+
138+XX document
139+
140+### `++rux`
141+
142+ ++ rux `tape`['0' 'x' (rum 16 ~ |=(b/@ (add b ?:((lth b 10) 48 87))))]
143+ --
144+ :::::::::::::::::::::::::::::::::::::::::::::::::::::: ::
145+
146+XX document
147+
148+------------------------------------------------------------------------
149+
150+
151+***
2152
3153### `++cass`
4154
@@ -20,10 +170,9 @@ Source
20170------
21171
22172 ++ cass :: lowercase
23− |= vib=tape
173+ |= vib/tape
24174 %+ rap 3
25− (turn vib |=(a=@ ?.(&((gte a 'A') (lte a 'Z')) a (add 32 a))))
26− ::
175+ (turn vib |=(a/@ ?.(&((gte a 'A') (lte a 'Z')) a (add 32 a))))
27176
28177Examples
29178--------
@@ -43,7 +192,7 @@ Examples
43192
44193Tape to cord
45194
46−Produce a [`++cord`]() from a [`++tape`]().
195+Produce a `++cord` from a `++tape`.
47196
48197Accepts
49198-------
@@ -76,8 +225,8 @@ Examples
76225
77226To uppercase
78227
79−Turn all occurances of lowercase letters in any [`++tape`]() into uppercase
80−letters, as a [`++cord`]().
228+Turn all occurances of lowercase letters in any `++tape` into uppercase
229+letters, as a `++cord`.
81230
82231Accepts
83232-------
@@ -117,12 +266,12 @@ Examples
117266
118267Escape special chars
119268
120−Escape special characters, used in [`++show`](/doc/hoon/library/2ez#++show)
269+Escape special characters, used in `++show`.
121270
122271Accepts
123272-------
124273
125−`vib` is a [`++tape`]().
274+`vib` is a `++tape`.
126275
127276Produces
128277--------
@@ -133,13 +282,13 @@ Source
133282------
134283
135284 ++ mesc :: ctrl code escape
136− |= vib=tape
285+ |= vib/tape
137286 ^- tape
138287 ?~ vib
139288 ~
140289 ?: =('\\' i.vib)
141290 ['\\' '\\' $(vib t.vib)]
142− ?: ?|((gth i.vib 126) (lth i.vib 32) =(39 i.vib))
291+ ?: ?|((gth i.vib 126) (lth i.vib 32) =(`@`39 i.vib))
143292 ['\\' (welp ~(rux at i.vib) '/' $(vib t.vib))]
144293 [i.vib $(vib t.vib)]
145294 ::
@@ -161,7 +310,7 @@ Examples
161310
162311Prepend `n` times
163312
164−Add `a` repetitions of character `b` to the head of [`++tape`]() `c`.
313+Add `a` repetitions of character `b` to the head of `++tape` `c`.
165314
166315Accepts
167316-------
@@ -179,7 +328,7 @@ Source
179328------
180329
181330 ++ runt :: prepend repeatedly
182− |= [[a=@ b=@] c=tape]
331+ |= [[a/@ b/@] c/tape]
183332 ^- tape
184333 ?: =(0 a)
185334 c
@@ -201,35 +350,35 @@ Examples
201350
202351Soft-cast by odor
203352
204−Soft-cast validity by [odor]().
353+Soft-cast validity by odor.
205354
206355Accepts
207356-------
208357
209−`a` is a [`++span`]() (`@ta`).
358+`a` is a `++span` (`@ta`).
210359
211360`b` is an atom.
212361
213362Produces
214363--------
215364
216−A `(unit ,@)`.
365+A `(unit @)`.
217366
218367Source
219368------
220369
221370 ++ sand :: atom sanity
222− |= a=@ta
223− |= b=@ ^- (unit ,@)
371+ |= a/@ta
372+ |= b/@ ^- (unit @)
224373 ?.(((sane a) b) ~ [~ b])
225374 ::
226375
227376Examples
228377--------
229378
230− /~zod/try=> `(unit ,@ta)`((sand %ta) 'sym-som')
379+ /~zod/try=> `(unit @ta)`((sand %ta) 'sym-som')
231380 [~ ~.sym-som]
232− /~zod/try=> `(unit ,@ta)`((sand %ta) 'err!')
381+ /~zod/try=> `(unit @ta)`((sand %ta) 'err!')
233382 ~
234383
235384
@@ -239,14 +388,14 @@ Examples
239388
240389Check odor validity
241390
242−Check validity by [odor](). Produces a [gate]().
391+Check validity by odor. Produces a gate.
243392
244393Accepts
245394-------
246395
247−`a` is a [`++span`]() (`@ta`).
396+`a` is a `++span` (`@ta`).
248397
249−`b` is an [atom]().
398+`b` is an atom.
250399
251400Produces
252401--------
@@ -257,8 +406,8 @@ Source
257406------
258407
259408 ++ sane :: atom sanity
260− |= a=@ta
261− |= b=@ ^- ?
409+ |= a/@ta
410+ |= b/@ ^- ?
262411 ?. =(%t (end 3 1 a))
263412 ~|(%sane-stub !!)
264413 =+ [inx=0 len=(met 3 b)]
@@ -314,7 +463,7 @@ Produces the number of utf8 bytes.
314463Accepts
315464-------
316465
317−`a` is a [`@t`]().
466+`a` is a `@t`.
318467
319468Produces
320469--------
@@ -324,14 +473,13 @@ An atom.
324473Source
325474------
326475
327− ++ teff :: length utf8
328− |= a=@t ^- @
476+ |= a/@t ^- @
329477 =+ b=(end 3 1 a)
478+ ~| %bad-utf8
330479 ?: =(0 b)
331− ?>(=(0 a) 0)
480+ ?>(=(`@`0 a) 0)
332481 ?> |((gte b 32) =(10 b))
333482 ?:((lte b 127) 1 ?:((lte b 223) 2 ?:((lte b 239) 3 4)))
334− ::
335483
336484Examples
337485--------
@@ -348,7 +496,7 @@ Examples
348496
349497Tape split
350498
351−Split first `a` characters off [`++tape`]() `b`.
499+Split first `a` characters off `++tape` `b`.
352500
353501Accepts
354502-------
@@ -365,17 +513,17 @@ A cell of `++tape`s, `p` and `q`.
365513Source
366514------
367515
368− ++ trim :: tape split
369− |= [a=@ b=tape]
370− ^- [p=tape q=tape]
371− ?~ b
372− [~ ~]
373− ?: =(0 a)
374− [~ b]
375− =+ c=$(a (dec a), b t.b)
376− [[i.b p.c] q.c]
516+ ++ trim :: 31-bit nonzero
517+ |= key/@
518+ =+ syd=0xcafe.babe
519+ |- ^- @
520+ =+ haz=(spec syd key)
521+ =+ ham=(mix (rsh 0 31 haz) (end 0 31 haz))
522+ ?.(=(0 ham) ham $(syd +(syd)))
523+ --
377524 ::
378525
526+
379527Examples
380528--------
381529
@@ -391,7 +539,7 @@ Examples
391539
392540Cord to tape
393541
394−Produce a [`++tape`]() from [`++cord`]().
542+Produce a `++tape` from `++cord`.
395543
396544Accepts
397545-------
@@ -408,12 +556,13 @@ Source
408556
409557 ++ trip :: cord to tape
410558 ~/ %trip
411− |= a=@ ^- tape
559+ |= a/@ ^- tape
412560 ?: =(0 (met 3 a))
413561 ~
414562 [^-(@ta (end 3 1 a)) $(a (rsh 3 1 a))]
415563 ::
416564
565+
417566Examples
418567--------
419568
@@ -431,7 +580,7 @@ Examples
431580
432581UTF8 to UTF32 tape
433582
434−Convert [`++tape`]() to a [`++list`]() of codepoints ([`@c`]()).
583+Convert `++tape` to a `++list` of codepoints (`@c`).
435584
436585Accepts
437586-------
@@ -441,14 +590,14 @@ Accepts
441590Produces
442591--------
443592
444−A `++list` of codepoints [`@c`]().
593+A `++list` of codepoints `@c`.
445594
446595Source
447596------
448597
449598 ++ tuba :: utf8 to utf32 tape
450− |= a=tape
451− ^- (list ,@c)
599+ |= a/tape
600+ ^- (list @c)
452601 (rip 5 (turf (rap 3 a))) :: XX horrible
453602 ::
454603
@@ -467,12 +616,12 @@ Examples
467616
468617UTF32 to UTF8 tape
469618
470−Wrap a [`++list`]() of utf32 codepoints into a utf8 [`++tape`]().
619+Wrap a `++list` of utf32 codepoints into a utf8 `++tape`.
471620
472621Accepts
473622-------
474623
475−`a` is a `++list` of [`@c`]().
624+`a` is a `++list` of `@c`.
476625
477626Produces
478627--------
@@ -483,7 +632,7 @@ Source
483632------
484633
485634 ++ tufa :: utf32 to utf8 tape
486− |= a=(list ,@c)
635+ |= a=(list @c)
487636 ^- tape
488637 ?~ a ""
489638 (weld (rip 3 (tuft i.a)) $(a t.a))
@@ -494,7 +643,7 @@ Examples
494643
495644 /~zod/try=> (tufa ~[~-~44f. ~-. ~-~442. ~-~443. ~-~442.])
496645 "я тут"
497− /~zod/try=> (tufa ((list ,@c) ~[%a %b 0xb1 %c]))
646+ /~zod/try=> (tufa ((list @c) ~[%a %b 0xb1 %c]))
498647 "ab±c"
499648
500649
@@ -505,12 +654,12 @@ Examples
505654UTF32 to UTF8 text
506655
507656Convert utf32 glyph to
508−[LSB](http://en.wikipedia.org/wiki/Least_significant_bit) utf8 [`++cord`]().
657+LSB utf8 `++cord`.
509658
510659Accepts
511660-------
512661
513−`a` is a codepoint ([`@c`]()).
662+`a` is a codepoint (`@c`).
514663
515664Produces
516665--------
@@ -521,22 +670,22 @@ Source
521670------
522671
523672 ++ tuft :: utf32 to utf8 text
524− |= a=@c
673+ |= a/@c
525674 ^- @t
526675 %+ rap 3
527− |- ^- (list ,@)
528− ?: =(0 a)
676+ |- ^- (list @)
677+ ?: =(`@`0 a)
529678 ~
530679 =+ b=(end 5 1 a)
531680 =+ c=$(a (rsh 5 1 a))
532− ?: (lth b 0x7f)
681+ ?: (lte b 0x7f)
533682 [b c]
534− ?: (lth b 0x7ff)
683+ ?: (lte b 0x7ff)
535684 :* (mix 0b1100.0000 (cut 0 [6 5] b))
536685 (mix 0b1000.0000 (end 0 6 b))
537686 c
538687 ==
539− ?: (lth b 0xffff)
688+ ?: (lte b 0xffff)
540689 :* (mix 0b1110.0000 (cut 0 [12 4] b))
541690 (mix 0b1000.0000 (cut 0 [6 6] b))
542691 (mix 0b1000.0000 (end 0 6 b))
@@ -565,39 +714,41 @@ Examples
565714
566715UTF8 to UTF32 cord
567716
568−Convert utf8 ([`++cord`]()) to utf32 codepoints.
717+Convert utf8 (`++cord`) to utf32 codepoints.
569718
570719Accepts
571720-------
572721
573−`a` is a [`@t`]().
722+`a` is a `@t`.
574723
575724Produces
576725--------
577726
578−A [`@c`](), UTF-32 codepoint.
727+A `@c`, UTF-32 codepoint.
579728
580729Source
581730------
582731
583732 ++ turf :: utf8 to utf32
584− |= a=@t
733+ |= a/@t
585734 ^- @c
586735 %+ rap 5
587− |- ^- (list ,@c)
736+ |- ^- (list @c)
588737 =+ b=(teff a)
589738 ?: =(0 b) ~
590− :- %+ can 0
739+ =+ ^= c
740+ %+ can 0
591741 %+ turn
592− ^- (list ,[p=@ q=@])
742+ ^- (list {p/@ q/@})
593743 ?+ b !!
594− 1 [[0 7] ~]
595− 2 [[8 6] [0 5] ~]
596− 3 [[16 6] [8 6] [0 4] ~]
597− 4 [[24 6] [16 6] [8 6] [0 3] ~]
744+ $1 [[0 7] ~]
745+ $2 [[8 6] [0 5] ~]
746+ $3 [[16 6] [8 6] [0 4] ~]
747+ $4 [[24 6] [16 6] [8 6] [0 3] ~]
598748 ==
599− |=([p=@ q=@] [q (cut 0 [p q] a)])
600− $(a (rsh 3 b a))
749+ |=({p/@ q/@} [q (cut 0 [p q] a)])
750+ ?. =((tuft c) (end 3 b a)) ~|(%bad-utf8 !!)
751+ [c $(a (rsh 3 b a))]
601752 ::
602753
603754Examples
@@ -621,7 +772,7 @@ Examples
621772
622773Coin format encode
623774
624−Escape [`++span`]() `~` as `~~` and `_` as `~-`. Used for printing.
775+Escape `++span` `~` as `~~` and `_` as `~-`. Used for printing.
625776
626777Accepts
627778-------
@@ -631,13 +782,13 @@ Accepts
631782Produces
632783--------
633784
634−A [`++span`]() (`@ta`).
785+A `++span` (`@ta`).
635786
636787Source
637788------
638789
639790 ++ wack :: coin format
640− |= a=@ta
791+ |= a/@ta
641792 ^- @ta
642793 =+ b=(rip 3 a)
643794 %+ rap 3
@@ -668,33 +819,37 @@ Examples
668819
669820Coin format decode
670821
671−Unescape [`++span`]() `~~` as `~` and `~-` as `_`.
822+Unescape `++span` `~~` as `~` and `~-` as `_`.
672823
673824Accepts
674825-------
675826
676−`a` is a an [atom]().
827+`a` is a an atom.
677828
678829Produces
679830--------
680831
681−A [`++span`]() `@ta`.
832+A `++span` `@ta`.
682833
683834Source
684835------
685836
686− ++ wick :: coin format
687− |= a=@
688− ^- @ta
837+ ++ wick :: knot format
838+ |= a/@
839+ ^- (unit @ta)
689840 =+ b=(rip 3 a)
690− %+ rap 3
691− |- ^- tape
692− ?~ b
693− ~
694− ?: =('~' i.b)
695− ?~ t.b !!
696− [?:(=('~' i.t.b) '~' ?>(=('-' i.t.b) '_')) $(b t.t.b)]
697− [i.b $(b t.b)]
841+ =- ?^(b ~ (some (rap 3 (flop c))))
842+ =| c/tape
843+ |- ^- {b/tape c/tape}
844+ ?~ b [~ c]
845+ ?. =('~' i.b)
846+ $(b t.b, c [i.b c])
847+ ?~ t.b [b ~]
848+ ?- i.t.b
849+ $'~' $(b t.t.b, c ['~' c])
850+ $'-' $(b t.t.b, c ['_' c])
851+ @ [b ~]
852+ ==
698853 ::
699854
700855Examples
@@ -712,27 +867,27 @@ Examples
712867
713868Unescape cord
714869
715−Unescape [`++cord`]() codepoints.
870+Unescape `++cord` codepoints.
716871
717872Accepts
718873-------
719874
720−`a` is a [`@ta`]().
875+`a` is a `@ta`.
721876
722877Produces
723878--------
724879
725−A [`++cord`]().
880+A `++cord`.
726881
727882Source
728883------
729884
730885 ++ woad :: cord format
731− |= a=@ta
886+ |= a/@ta
732887 ^- @t
733888 %+ rap 3
734− |- ^- (list ,@)
735− ?: =(0 a)
889+ |- ^- (list @)
890+ ?: =(`@`0 a)
736891 ~
737892 =+ b=(end 3 1 a)
738893 =+ c=(rsh 3 1 a)
@@ -744,7 +899,7 @@ Source
744899 ?+ b =- (weld (rip 3 (tuft p.d)) $(a q.d))
745900 ^= d
746901 =+ d=0
747− |- ^- [p=@ q=@]
902+ |- ^- {p/@ q/@}
748903 ?: =('.' b)
749904 [d c]
750905 ?< =(0 c)
@@ -756,8 +911,8 @@ Source
756911 ?: &((gte b '0') (lte b '9')) 48
757912 ?>(&((gte b 'a') (lte b 'z')) 87)
758913 ==
759− %'.' ['.' $(a c)]
760− %'~' ['~' $(a c)]
914+ $'.' ['.' $(a c)]
915+ $'~' ['~' $(a c)]
761916 ==
762917 ::
763918
@@ -774,50 +929,46 @@ Examples
774929
775930Escape cord
776931
777−Escape [`++cord`]() codepoints.
932+Escape `++cord` codepoints.
778933
779934Accepts
780935-------
781936
782−`a` is a [`++span`]() (`@ta`).
937+`a` is a `++span` (`@ta`).
783938
784939Produces
785940--------
786941
787−A [`++span`]() (`@ta`).
942+A `++span` (`@ta`).
788943
789944Source
790945------
791946
792947 ++ wood :: cord format
793− |= a=@t
948+ |= a/@t
794949 ^- @ta
795950 %+ rap 3
796− |- ^- (list ,@)
797− ?: =(0 a)
951+ |- ^- (list @)
952+ ?: =(`@`0 a)
798953 ~
799954 =+ b=(teff a)
800955 =+ c=(turf (end 3 b a))
801956 =+ d=$(a (rsh 3 b a))
802957 ?: ?| &((gte c 'a') (lte c 'z'))
803958 &((gte c '0') (lte c '9'))
804− =('-' c)
959+ =(`@`'-' c)
805960 ==
806961 [c d]
807962 ?+ c
808963 :- '~'
809964 =+ e=(met 2 c)
810965 |- ^- tape
811− ?: =(0 c)
966+ ?: =(0 e)
812967 ['.' d]
813968 =. e (dec e)
814969 =+ f=(rsh 2 e c)
815970 [(add ?:((lte f 9) 48 87) f) $(c (end 2 e c))]
816971 ::
817− %' ' ['.' d]
818− %'.' ['~' '.' d]
819− %'~' ['~' '~' d]
820− ==
821972
822973Examples
823974--------
@@ -826,152 +977,4 @@ Examples
826977 ~.my.~df.am
827978
828979
829−***
830−### `++at`
831−
832− ++ at
833− |_ a=@
834−
835−XX document
836−
837−### `++r`
838−
839− ++ r
840− ?: ?& (gte (met 3 a) 2)
841− |-
842− ?: =(0 a)
843− &
844− =+ vis=(end 3 1 a)
845− ?& ?|(=('-' vis) ?&((gte vis 'a') (lte vis 'z')))
846− $(a (rsh 3 1 a))
847− ==
848− ==
849− rtam
850− ?: (lte (met 3 a) 2)
851− rud
852− rux
853− ::
854−
855−XX document
856−
857−### `++rf`
858−
859− ++ rf `tape`[?-(a & '&', | '|', * !!) ~]
860−
861−XX document
862−
863−### `++rn`
864−
865− ++ rn `tape`[?>(=(0 a) '~') ~]
866−
867−XX document
868−
869−### `++rt`
870−
871− ++ rt `tape`['\'' (weld (mesc (trip a)) `tape`['\'' ~])]
872−
873−XX document
874−
875−### `++rta`
876−
877− ++ rta rt
878−
879−XX document
880−
881−### `++rtam`
882−
883− ++ rtam `tape`['%' (trip a)]
884−
885−XX document
886−
887−### `++rub`
888−
889− ++ rub `tape`['0' 'b' (rum 2 ~ |=(b=@ (add '0' b)))]
890−
891−XX document
892−
893−### `++rud`
894−
895− ++ rud (rum 10 ~ |=(b=@ (add '0' b)))
896−
897−XX document
898−
899−### `++rum`
900−
901− ++ rum
902− |= [b=@ c=tape d=$+(@ @)]
903− ^- tape
904− ?: =(0 a)
905− [(d 0) c]
906− =+ e=0
907− |- ^- tape
908− ?: =(0 a)
909− c
910− =+ f=&(!=(0 e) =(0 (mod e ?:(=(10 b) 3 4))))
911− %= $
912− a (div a b)
913− c [(d (mod a b)) ?:(f [?:(=(10 b) ',' '-') c] c)]
914− e +(e)
915− ==
916− ::
917−
918−XX document
919−
920−### `++rup`
921−
922− ++ rup
923− =+ b=(met 3 a)
924− ^- tape
925− :- '-'
926− |- ^- tape
927− ?: (gth (met 5 a) 1)
928− %+ weld
929− $(a (rsh 5 1 a), b (sub b 4))
930− `tape`['-' '-' $(a (end 5 1 a), b 4)]
931− ?: =(0 b)
932− ['~' ~]
933− ?: (lte b 1)
934− (trip (tos:po a))
935− |- ^- tape
936− ?: =(2 b)
937− =+ c=(rsh 3 1 a)
938− =+ d=(end 3 1 a)
939− (weld (trip (tod:po c)) (trip (tos:po (mix c d))))
940− =+ c=(rsh 3 2 a)
941− =+ d=(end 3 2 a)
942− (weld ^$(a c, b (met 3 c)) `tape`['-' $(a (mix c d), b 2)])
943− ::
944−
945−XX document
946−
947−### `++ruv`
948−
949− ++ ruv
950− ^- tape
951− :+ '0'
952− 'v'
953− %^ rum
954− 64
955− ~
956− |= b=@
957− ?: =(63 b)
958− '+'
959− ?: =(62 b)
960− '-'
961− ?:((lth b 26) (add 65 b) ?:((lth b 52) (add 71 b) (sub b 4)))
962− ::
963−
964−XX document
965−
966−### `++rux`
967−
968− ++ rux `tape`['0' 'x' (rum 16 ~ |=(b=@ (add b ?:((lth b 10) 48 87))))]
969− --
970− :::::::::::::::::::::::::::::::::::::::::::::::::::::: ::
971−
972−XX document
973−
974−------------------------------------------------------------------------
975−
976−
977980***
docs/system/hoon/library/4c.md+135−147
@@ -1,114 +1,9 @@
11# 4c: tank printer
2−### `++show`
3−
4− ++ show :: XX deprecated, use type
5− |= vem=*
6− |^ ^- tank
7− ?: ?=(@ vem)
8− [%leaf (mesc (trip vem))]
9− ?- vem
10− [s=~ c=*]
11− [%leaf '\'' (weld (mesc (tape +.vem)) `tape`['\'' ~])]
12− ::
13− [s=%a c=@] [%leaf (mesc (trip c.vem))]
14− [s=%b c=*] (shop c.vem |=(a=@ ~(rub at a)))
15− [s=[%c p=@] c=*]
16− :+ %palm
17− [['.' ~] ['-' ~] ~ ~]
18− [[%leaf (mesc (trip p.s.vem))] $(vem c.vem) ~]
19− ::
20− [s=%d c=*] (shop c.vem |=(a=@ ~(rud at a)))
21− [s=%k c=*] (tank c.vem)
22− [s=%h c=*]
23− ?: =(0 c.vem) :: XX remove after 220
24− [%leaf '#' ~]
25− :+ %rose
26− [['/' ~] ['/' ~] ~]
27− =+ yol=((list ,@ta) c.vem)
28− (turn yol |=(a=@ta [%leaf (trip a)]))
29− ::
30− [s=%o c=*]
31− %= $
32− vem
33− :- [%m '%h:<[%d %d].[%d %d]>']
34− [-.c.vem +<-.c.vem +<+.c.vem +>-.c.vem +>+.c.vem ~]
35− ==
36− ::
37− [s=%p c=*] (shop c.vem |=(a=@ ~(rup at a)))
38− [s=%q c=*] (shop c.vem |=(a=@ ~(r at a)))
39− [s=%r c=*] $(vem [[%r ' ' '{' '}'] c.vem])
40− [s=%t c=*] (shop c.vem |=(a=@ ~(rt at a)))
41− [s=%v c=*] (shop c.vem |=(a=@ ~(ruv at a)))
42− [s=%x c=*] (shop c.vem |=(a=@ ~(rux at a)))
43− [s=[%m p=@] c=*] (shep p.s.vem c.vem)
44− [s=[%r p=@] c=*]
45− $(vem [[%r ' ' (cut 3 [0 1] p.s.vem) (cut 3 [1 1] p.s.vem)] c.vem])
46− ::
47− [s=[%r p=@ q=@ r=@] c=*]
48− :+ %rose
49− :* p=(mesc (trip p.s.vem))
50− q=(mesc (trip q.s.vem))
51− r=(mesc (trip r.s.vem))
52− ==
53− |- ^- (list tank)
54− ?@ c.vem
55− ~
56− [^$(vem -.c.vem) $(c.vem +.c.vem)]
57− ::
58− [s=%z c=*] $(vem [[%r %$ %$ %$] c.vem])
59− * !!
60− ==
61−
62−XX document
63−
64−### `++shep`
65−
66− ++ shep
67− |= [fom=@ gar=*]
68− ^- tank
69− =+ l=(met 3 fom)
70− =+ i=0
71− :- %leaf
72− |- ^- tape
73− ?: (gte i l)
74− ~
75− =+ c=(cut 3 [i 1] fom)
76− ?. =(37 c)
77− (weld (mesc [c ~]) $(i +(i)))
78− =+ d=(cut 3 [+(i) 1] fom)
79− ?. .?(gar)
80− ['\\' '#' $(i (add 2 i))]
81− (weld ~(ram re (show d -.gar)) $(i (add 2 i), gar +.gar))
82− ::
83−
84−XX document
85−
86−### `++shop`
87−
88− ++ shop
89− |= [aug=* vel=$+(a=@ tape)]
90− ^- tank
91− ?: ?=(@ aug)
92− [%leaf (vel aug)]
93− :+ %rose
94− [[' ' ~] ['[' ~] [']' ~]]
95− => .(aug `*`aug)
96− |- ^- (list tank)
97− ?: ?=(@ aug)
98− [^$ ~]
99− [^$(aug -.aug) $(aug +.aug)]
100− --
101−
102−XX document
103−
104−
105−
106−***
1072### `++re`
1083
1094Pretty-printing engine
1105
111−Pretty-printing engine that accepts a [`++tank`](/doc/hoon/library/1#++tank) [sample]() and contains arms that perform computation on it.
6+Pretty-printing engine that accepts a `++tank` sample and contains arms that perform computation on it.
1127
1138Accepts
1149-------
@@ -119,24 +14,24 @@ Produces
11914--------
12015
12116 ++ re
122− |_ tac=tank
17+ |_ tac/tank
12318
12419Examples
12520--------
12621
127− /~zod/try=> ~(. re leaf/"ham")
128− <2.ghl [[%leaf ""] <414.gly 100.xkc 1.ypj %164>]>
22+ /~zod/try=> ~(. re leaf+"ham")
23+ <2.gdc {tac/{$leaf ""} <402.arm 110.jyx 1.ztu $151>}>
12924
13025### `++ram`
13126
13227Flatten to tape
13328
134−Flatten [`++tank`]() out into a [`++tape`]().
29+Flatten `++tank` out into a `++tape`.
13530
13631Accepts
13732-------
13833
139−`tac` is a `++tank`, taken from [sample]() of `++re` [core]().
34+`tac` is a `++tank`, taken from sample of `++re` core.
14035
14136Produces
14237--------
@@ -149,9 +44,9 @@ Source
14944 ++ ram
15045 ^- tape
15146 ?- -.tac
152− %leaf p.tac
153− %palm ram(tac [%rose [p.p.tac (weld q.p.tac r.p.tac) s.p.tac] q.tac])
154− %rose
47+ $leaf p.tac
48+ $palm ram(tac [%rose [p.p.tac (weld q.p.tac r.p.tac) s.p.tac] q.tac])
49+ $rose
15550 %+ weld
15651 q.p.tac
15752 |- ^- tape
@@ -165,9 +60,9 @@ Source
16560Examples
16661--------
16762
168− /~zod/try=> ~(ram re leaf/"foo")
63+ /~zod/try=> ~(ram re leaf+"foo")
16964 "foo"
170− /~zod/try=> ~(ram re rose/["." "(" ")"]^~[leaf/"bar" leaf/"baz" leaf/"bam"])
65+ /~zod/try=> ~(ram re rose+["." "(" ")"]^~[leaf+"bar" leaf+"baz" leaf+"bam"])
17166 "(bar.baz.bam)"
17267
17368### `++win`
@@ -179,25 +74,25 @@ Render at indent level `tab` and width `edg`.
17974Accepts
18075-------
18176
182−`tac` is a `++tank`, taken from [sample]() of `++re` [core]().
77+`tac` is a `++tank`, taken from sample of `++re` core.
18378
18479`tab` and `edg` are atoms.
18580
18681Produces
18782--------
18883
189−A [`++wall`]() ([`++list`]() of [`++tapes`]()).
84+A `++wall` (`++list` of `++tapes`).
19085
19186Source
19287------
19388
19489 ++ win
195− |= [tab=@ edg=@]
90+ |= {tab/@ edg/@}
19691 =+ lug=`wall`~
19792 |^ |- ^- wall
19893 ?- -.tac
199− %leaf (rig p.tac)
200− %palm
94+ $leaf (rig p.tac)
95+ $palm
20196 ?: fit
20297 (rig ram)
20398 ?~ q.tac
@@ -217,30 +112,17 @@ Source
217112 ==
218113 (wig(lug qyr) q.p.tac)
219114 ::
220− %rose
221− ?: fit
222− (rig ram)
223− =+ ^= gyl
224− |- ^- wall
225− ?~ q.tac
226− ?:(=(%$ r.p.tac) lug (rig r.p.tac))
227− ^$(tac i.q.tac, lug $(q.tac t.q.tac), tab din)
228− ?: =(%$ q.p.tac)
229− gyl
230− (wig(lug gyl) q.p.tac)
231− ==
232− ::
233115
234116Examples
235117--------
236118
237− /~zod/try=> (~(win re leaf/"samoltekon-lapdok") 0 20)
119+ /~zod/try=> (~(win re leaf+"samoltekon-lapdok") 0 20)
238120 <<"samoltekon-lapdok">>
239− /~zod/try=> (~(win re leaf/"samoltekon-lapdok") 0 10)
121+ /~zod/try=> (~(win re leaf+"samoltekon-lapdok") 0 10)
240122 <<"\/samolt\/" " ekon-l" " apdok" "\/ \/">>
241− /~zod/try=> (~(win re rose/["--" "[" "]"]^~[leaf/"1423" leaf/"2316"]) 0 20)
123+ /~zod/try=> (~(win re rose+["--" "[" "]"]^~[leaf+"1423" leaf+"2316"]) 0 20)
242124 <<"[1423--2316]">>
243− /~zod/try=> (~(win re rose/["--" "[" "]"]^~[leaf/"1423" leaf/"2316"]) 0 10)
125+ /~zod/try=> (~(win re rose+["--" "[" "]"]^~[leaf+"1423" leaf+"2316"]) 0 10)
244126 <<"[ 1423" " 2316" "]">>
245127
246128### `++din`
@@ -291,28 +173,28 @@ Examples
291173
292174Wrap in `\/`
293175
294−Wrap [`++tape`]() in `\/` if it doesn't fit at current indentation. Internal to
295−[`++win`]()
176+Wrap `++tape` in `\/` if it doesn't fit at current indentation. Internal to
177+`++win`
296178
297179Accepts
298180-------
299181
300−`tac` is a `++tank`, taken from [sample]() of `++re` [core]().
182+`tac` is a `++tank`, taken from sample of `++re` core.
301183
302184`hom` is a `++tape`.
303185
304186Produces
305187--------
306188
307−A [`++wall`]() (list of `++tape`s).
189+A `++wall` (list of `++tape`s).
308190
309191Source
310192------
311193
312194 ++ rig
313− |= hom=tape
195+ |= hom/tape
314196 ^- wall
315− ?: (lte (lent hom) (sub edg tab))
197+ ?: & ::(lte (lent hom) (sub edg tab))
316198 [(runt [tab ' '] hom) lug]
317199 => .(tab (add tab 2), edg (sub edg 2))
318200 =+ mut=(trim (sub edg tab) hom)
@@ -335,12 +217,12 @@ Examples
335217
336218`++win` render tape
337219
338−Render [`++tape`](). Internal to [`++win`]().
220+Render `++tape`. Internal to `++win`.
339221
340222Accepts
341223-------
342224
343−`tac` is a `++tank`, taken from [sample]() of `++re` [core]().
225+`tac` is a `++tank`, taken from sample of `++re` core.
344226
345227`hom` is a `++tape`.
346228
@@ -348,7 +230,7 @@ Produces
348230--------
349231
350232 ++ wig
351− |= hom=tape
233+ |= hom/tape
352234 ^- wall
353235 ?~ lug
354236 (rig hom)
@@ -365,4 +247,110 @@ Produces
365247
366248
367249
250+
251+***
252+### `++show`
253+
254+ ++ show :: XX deprecated, use span
255+ |= vem/*
256+ |^ ^- tank
257+ ?: ?=(@ vem)
258+ [%leaf (mesc (trip vem))]
259+ ?- vem
260+ {s/$~ c/*}
261+ [%leaf '\'' (weld (mesc (tape +.vem)) `tape`['\'' ~])]
262+ ::
263+ {s/$a c/@} [%leaf (mesc (trip c.vem))]
264+ {s/$b c/*} (shop c.vem |=(a/@ ~(rub at a)))
265+ {s/{$c p/@} c/*}
266+ :+ %palm
267+ [['.' ~] ['-' ~] ~ ~]
268+ [[%leaf (mesc (trip p.s.vem))] $(vem c.vem) ~]
269+ ::
270+ {s/$d c/*} (shop c.vem |=(a/@ ~(rud at a)))
271+ {s/$k c/*} (tank c.vem)
272+ {s/$h c/*}
273+ :+ %rose
274+ [['/' ~] ['/' ~] ~]
275+ =+ yol=((list @ta) c.vem)
276+ (turn yol |=(a/@ta [%leaf (trip a)]))
277+ ::
278+ {s/$l c/*} (shol c.vem)
279+ {s/$o c/*}
280+ %= $
281+ vem
282+ :- [%m '%h:<[%d %d].[%d %d]>']
283+ [-.c.vem +<-.c.vem +<+.c.vem +>-.c.vem +>+.c.vem ~]
284+ ==
285+ ::
286+ {s/$p c/*} (shop c.vem |=(a/@ ~(rup at a)))
287+ {s/$q c/*} (shop c.vem |=(a/@ ~(r at a)))
288+ {s/$r c/*} $(vem [[%r ' ' '{' '}'] c.vem])
289+ {s/$t c/*} (shop c.vem |=(a/@ ~(rt at a)))
290+ {s/$v c/*} (shop c.vem |=(a/@ ~(ruv at a)))
291+ {s/$x c/*} (shop c.vem |=(a/@ ~(rux at a)))
292+ {s/{$m p/@} c/*} (shep p.s.vem c.vem)
293+ {s/{$r p/@} c/*}
294+ $(vem [[%r ' ' (cut 3 [0 1] p.s.vem) (cut 3 [1 1] p.s.vem)] c.vem])
295+ ::
296+ {s/{$r p/@ q/@ r/@} c/*}
297+ :+ %rose
298+ :* p=(mesc (trip p.s.vem))
299+ q=(mesc (trip q.s.vem))
300+ r=(mesc (trip r.s.vem))
301+ ==
302+ |- ^- (list tank)
303+ ?@ c.vem
304+ ~
305+ [^$(vem -.c.vem) $(c.vem +.c.vem)]
306+ ::
307+ {s/$z c/*} $(vem [[%r %$ %$ %$] c.vem])
308+ * !!
309+ ==
310+
311+XX document
312+
313+### `++shep`
314+
315+ ++ shep
316+ |= {fom/@ gar/*}
317+ ^- tank
318+ =+ l=(met 3 fom)
319+ =+ i=0
320+ :- %leaf
321+ |- ^- tape
322+ ?: (gte i l)
323+ ~
324+ =+ c=(cut 3 [i 1] fom)
325+ ?. =(37 c)
326+ (weld (mesc [c ~]) $(i +(i)))
327+ =+ d=(cut 3 [+(i) 1] fom)
328+ ?. .?(gar)
329+ ['\\' '#' $(i (add 2 i))]
330+ (weld ~(ram re (show d -.gar)) $(i (add 2 i), gar +.gar))
331+ ::
332+
333+XX document
334+
335+### `++shop`
336+
337+ ++ shop
338+ |= {aug/* vel/$-(a/@ tape)}
339+ ^- tank
340+ ?: ?=(@ aug)
341+ [%leaf (vel aug)]
342+ :+ %rose
343+ [[' ' ~] ['[' ~] [']' ~]]
344+ => .(aug `*`aug)
345+ |- ^- (list tank)
346+ ?: ?=(@ aug)
347+ [^$ ~]
348+ [^$(aug -.aug) $(aug +.aug)]
349+ ::
350+
351+
352+XX document
353+
354+
355+
368356***
docs/system/hoon/library/4d.md+8−8
@@ -3,15 +3,15 @@
33
44Farther trace
55
6−Compares two line-column pairs, called [`++hair`]()s, `zyc` and `naz`, producing whichever
6+Compares two line-column pairs, called `++hair`s, `zyc` and `naz`, producing whichever
77is further along.
88
99Accepts
1010-------
1111
12−`naz` is a [hair]().
12+`naz` is a hair.
1313
14−`zyc` is a [hair]().
14+`zyc` is a hair.
1515
1616Produces
1717--------
@@ -21,12 +21,11 @@ a `++hair`.
2121Source
2222------
2323
24− ++ last |= [zyc=hair naz=hair] :: farther trace
24+ ++ last |= {zyc/hair naz/hair} :: farther trace
2525 ^- hair
2626 ?: =(p.zyc p.naz)
2727 ?:((gth q.zyc q.naz) zyc naz)
2828 ?:((gth p.zyc p.naz) zyc naz)
29− ::
3029
3130
3231Examples
@@ -48,7 +47,7 @@ Examples
4847
4948Detect newline
5049
51−Advances the [`++hair`]() `naz` by a row if the [`++char`]() `weq` is a newline, or by a
50+Advances the `++hair` `naz` by a row if the `++char` `weq` is a newline, or by a
5251column if `weq` is any other character.
5352
5453Accepts
@@ -66,9 +65,10 @@ A hair.
6665Source
6766------
6867
69− ++ lust |= [weq=char naz=hair] :: detect newline
68+ ++ lust |= {weq/char naz/hair} :: detect newline
7069 ^- hair
71− ?:(=(10 weq) [+(p.naz) 1] [p.naz +(q.naz)])
70+ ?:(=(`@`10 weq) [+(p.naz) 1] [p.naz +(q.naz)])
71+
7272
7373
7474Examples
docs/system/hoon/library/4e.md+51−48
@@ -3,8 +3,8 @@
33
44Conditional composer
55
6−Parsing composer: connects the [`++edge`]() `vex` with the subsequent [`++rule`]() `sab`
7−as an optional suffix, using [gate]() `raq` to compose or reject its
6+Parsing composer: connects the `++edge` `vex` with the subsequent `++rule` `sab`
7+as an optional suffix, using gate `raq` to compose or reject its
88result. If there is no suffix, or if the suffix fails to be composed
99with the current result, the current result is produced. Used to map a
1010group of rules to a specified output.
@@ -12,25 +12,25 @@ group of rules to a specified output.
1212Accepts
1313-------
1414
15−`raq` is a [gate]().
15+`raq` is a gate.
1616
17−`sab` is a [rule]().
17+`sab` is a rule.
1818
19−`vex` is an [edge]().
19+`vex` is an edge.
2020
2121Produces
2222--------
2323
24−A [`++rule`]().
24+A `++rule`.
2525
2626Source
2727------
2828
2929 ++ bend :: conditional comp
3030 ~/ %bend
31− |* raq=_|*([a=* b=*] [~ u=[a b]])
31+ |* raq/_|*({a/* b/*} [~ u=[a b]])
3232 ~/ %fun
33− |* [vex=edge sab=_rule]
33+ |* {vex/edge sab/rule}
3434 ?~ q.vex
3535 vex
3636 =+ yit=(sab q.u.q.vex)
@@ -46,18 +46,18 @@ Source
4646Examples
4747--------
4848
49− ~zod/try=> (;~((bend |=([a=char b=char] ?.(=(a b) ~ (some +(a))))) prn prn) [1 1] "qs")
49+ ~zod/try=> (;~((bend |=([a/char b/char] ?.(=(a b) ~ (some +(a))))) prn prn) [1 1] "qs")
5050 [p=[p=1 q=3] q=[~ u=[p=~~q q=[p=[p=1 q=2] q="s"]]]]
51− ~zod/try=> (;~((bend |=([a=char b=char] ?.(=(a b) ~ (some +(a))))) prn prn) [1 1] "qqq")
51+ ~zod/try=> (;~((bend |=([a/char b/char] ?.(=(a b) ~ (some +(a))))) prn prn) [1 1] "qqq")
5252 [p=[p=1 q=3] q=[~ u=[p=~~r q=[p=[p=1 q=3] q="q"]]]]
53− ~zod/try=> (scan "aa" ;~((bend |=([a=char b=char] ?.(=(a b) ~ (some +(a))))) prn prn))
53+ ~zod/try=> (scan "aa" ;~((bend |=([a/char b/char] ?.(=(a b) ~ (some +(a))))) prn prn))
5454 ~~b
55− ~zod/try=> (scan "ba" ;~((bend |=([a=char b=char] ?.(=(a b) ~ (some +(a))))) prn prn))
55+ ~zod/try=> (scan "ba" ;~((bend |=([a/char b/char] ?.(=(a b) ~ (some +(a))))) prn prn))
5656 ! {1 3}
5757 ! exit
58− ~zod/try=> `(unit ,@tas)`(scan "" ;~((bend) (easy ~) sym))
58+ ~zod/try=> `(unit @tas)`(scan "" ;~((bend) (easy ~) sym))
5959 ~
60− ~zod/try=> `(unit ,@tas)`(scan "sep" ;~((bend) (easy ~) sym))
60+ ~zod/try=> `(unit @tas)`(scan "sep" ;~((bend) (easy ~) sym))
6161 [~ %sep]
6262
6363
@@ -67,14 +67,14 @@ Examples
6767
6868Arbitrary compose
6969
70−Parsing composer: connects the [`++edge`]() `vex` with a following [`++rule`]() `sab`,
70+Parsing composer: connects the `++edge` `vex` with a following `++rule` `sab`,
7171combining the contents of `vex` with the result of `sab` using a binary
72−[gate]() `raq`. Used to fold over the results of several `++rules`.
72+gate `raq`. Used to fold over the results of several `++rules`.
7373
7474Accepts
7575-------
7676
77−`raq` is a gate that accepts a cell of two [nouns](), `a` and `b`, and
77+`raq` is a gate that accepts a cell of two nouns, `a` and `b`, and
7878produces a cell of two nouns.
7979
8080`sab` is a rule.
@@ -84,16 +84,17 @@ produces a cell of two nouns.
8484Produces
8585--------
8686
87−A [`++rule`]().
87+A `++rule`.
8888
8989Source
9090------
9191
9292 ++ comp
9393 ~/ %comp
94− |* raq=_|*([a=* b=*] [a b]) :: arbitrary compose
94+ |* raq/_|*({a/* b/*} [a b]) :: arbitrary compose
9595 ~/ %fun
96− |* [vex=edge sab=_rule]
96+ |* {vex/edge sab/rule}
97+ ~! +<
9798 ?~ q.vex
9899 vex
99100 =+ yit=(sab q.u.q.vex)
@@ -106,9 +107,9 @@ Source
106107Examples
107108--------
108109
109− ~zod/try=> (scan "123" ;~((comp |=([a=@u b=@u] (add a b))) dit dit dit))
110+ ~zod/try=> (scan "123" ;~((comp |=([a/@u b/@u] (add a b))) dit dit dit))
110111 6
111− ~zod/try=> (scan "12" ;~((comp |=([a=@u b=@u] (add a b))) dit dit dit))
112+ ~zod/try=> (scan "12" ;~((comp |=([a/@u b/@u] (add a b))) dit dit dit))
112113 ! {1 3}
113114 ! exit
114115
@@ -117,13 +118,13 @@ Examples
117118
118119Never parse
119120
120−Produces an [`++edge`]() at the same text position ([`++hair`]()) with a failing
121+Produces an `++edge` at the same text position (`++hair`) with a failing
121122result (`q=~`).
122123
123124Accepts
124125-------
125126
126−`tub` is a [`++nail`]().
127+`tub` is a `++nail`.
127128
128129Produces
129130--------
@@ -133,7 +134,7 @@ An `++edge`.
133134Source
134135------
135136
136− ++ fail |=(tub=nail [p=p.tub q=~]) :: never parse
137+ ++ fail |=(tub/nail [p=p.tub q=~]) :: never parse
137138
138139Examples
139140--------
@@ -150,7 +151,7 @@ Examples
150151
151152Skip delimiter
152153
153−Parsing composer: connects an [`++edge`]() `vex` with a following [`++rule`]() `sab` by
154+Parsing composer: connects an `++edge` `vex` with a following `++rule` `sab` by
154155parsing the `++rule` `bus` (the delimiting symbol) and throwing out the
155156result.
156157
@@ -173,9 +174,9 @@ Source
173174
174175 ++ glue :: add rule
175176 ~/ %glue
176− |* bus=_rule
177+ |* bus/rule
177178 ~/ %fun
178− |* [vex=edge sab=_rule]
179+ |* {vex/edge sab/rule}
179180 (plug vex ;~(pfix bus sab))
180181 ::
181182
@@ -198,8 +199,8 @@ Examples
198199
199200Parse unless
200201
201−Parsing composer: if an [`++edge`]() `vex` reflects a success, fail. Otherwise,
202−connect `vex` with the following [`++rule`]().
202+Parsing composer: if an `++edge` `vex` reflects a success, fail. Otherwise,
203+connect `vex` with the following `++rule`.
203204
204205Accepts
205206-------
@@ -217,11 +218,11 @@ Source
217218------
218219
219220 ++ less :: no first and second
220− |* [vex=edge sab=_rule]
221+ |* {vex/edge sab/rule}
221222 ?~ q.vex
222223 =+ roq=(sab)
223224 [p=(last p.vex p.roq) q=q.roq]
224− vex(q ~)
225+ (fail +<.sab)
225226 ::
226227
227228Examples
@@ -243,13 +244,13 @@ Examples
243244
244245Discard first rule
245246
246−Parsing composer: connects an [`++edge`]() `vex` with two subsequent [`++rule`]()s,
247+Parsing composer: connects an `++edge` `vex` with two subsequent `++rule`s,
247248ignoring the result of the first and producing the result of the second.
248249
249250Accepts
250251-------
251252
252−`vex` is an [edge]().
253+`vex` is an edge.
253254
254255Produces
255256--------
@@ -261,8 +262,7 @@ Source
261262
262263 ++ pfix :: discard first rule
263264 ~/ %pfix
264− (comp |*([a=* b=*] b))
265− ::
265+ (comp |*({a/* b/*} b))
266266
267267Examples
268268--------
@@ -279,8 +279,8 @@ Examples
279279
280280Parse to tuple
281281
282−Parsing composer: connects an [`++edge`]() `vex` with a following [`++rule`]() `sab`, producing
283−a cell of both the results. See also: the monad applicator [;\~]() for a
282+Parsing composer: connects an `++edge` `vex` with a following `++rule` `sab`, producing
283+a cell of both the results. See also: the monad applicator ;\~ for a
284284more detailed explanation.
285285
286286Accepts
@@ -300,7 +300,7 @@ Source
300300
301301 ++ plug :: first then second
302302 ~/ %plug
303− |* [vex=edge sab=_rule]
303+ |* {vex/edge sab/rule}
304304 ?~ q.vex
305305 vex
306306 =+ yit=(sab q.u.q.vex)
@@ -328,14 +328,14 @@ Examples
328328Parse options
329329
330330Parsing composer: if `vex` reflects a failure, connect it with the
331−following rule `sab`. See also: the monad applicator [;\~]()
331+following rule `sab`. See also: the monad applicator ;\~
332332
333333Accepts
334334-------
335335
336−`sab` is a [`++rule`]().
336+`sab` is a `++rule`.
337337
338−`vex` is an [`++edge`]().
338+`vex` is an `++edge`.
339339
340340Produces
341341--------
@@ -347,11 +347,13 @@ Source
347347
348348 ++ pose :: first or second
349349 ~/ %pose
350− |* [vex=edge sab=_rule]
350+ |* {vex/edge sab/rule}
351351 ?~ q.vex
352352 =+ roq=(sab)
353353 [p=(last p.vex p.roq) q=q.roq]
354354 vex
355+ ::
356+
355357
356358Examples
357359--------
@@ -373,7 +375,7 @@ Examples
373375
374376Discard second rule
375377
376−Parsing composer: connects [`++edge`]()s `vex` with two subsequent [`++rule`]()s returning the
378+Parsing composer: connects `++edge`s `vex` with two subsequent `++rule`s returning the
377379result of the first and discarding the result of the second.
378380
379381Accepts
@@ -393,7 +395,8 @@ Source
393395
394396 ++ sfix :: discard second rule
395397 ~/ %sfix
396− (comp |*([a=* b=*] a))
398+ (comp |*({a/* b/*} a))
399+
397400
398401Examples
399402--------
@@ -410,8 +413,8 @@ Examples
410413
411414First and second
412415
413−Parsing composer: if an [`++edge`]() `vex` reflects a failure, fail. Otherwise,
414−connect `vex` with the following [`++rule`]().
416+Parsing composer: if an `++edge` `vex` reflects a failure, fail. Otherwise,
417+connect `vex` with the following `++rule`.
415418
416419Accepts
417420-------
@@ -429,7 +432,7 @@ Source
429432------
430433
431434 ++ simu :: first and second
432− |* [vex=edge sab=_rule]
435+ |* {vex/edge sab/rule}
433436 ?~ q.vex
434437 vex
435438 =+ roq=(sab)
docs/system/hoon/library/4f.md+147−127
@@ -1,32 +1,34 @@
11# 4f: parsing (rule builders)
22### `++bass`
33
4−Parser modifier: [LSB](http://en.wikipedia.org/wiki/Least_significant_bit)
5−ordered [`++list`]() as atom of a [`++base`]().
4+Parser modifier: LSB
5+ordered `++list` as atom of a `++base`.
66
77Accepts
88-------
99
1010`wuc` is an atom.
1111
12−`tyd` is a [`++rule`]().
12+`tyd` is a `++rule`.
1313
1414Produces
1515--------
1616
17−A [`++rule`]().
17+A `++rule`.
1818
1919Source
2020------
2121
2222 ++ bass
23− |* [wuc=@ tyd=_rule]
23+ |* {wuc/@ tyd/rule}
2424 %+ cook
25− |= waq=(list ,@)
25+ |= waq/(list @)
2626 %+ roll
2727 waq
28− =|([p=@ q=@] |.((add p (mul wuc q))))
28+ =|({p/@ q/@} |.((add p (mul wuc q))))
2929 tyd
30+ ::
31+
3032
3133Examples
3234--------
@@ -44,32 +46,34 @@ Examples
4446
4547### `++boss`
4648
47−Parser modifier: [LSB](http://en.wikipedia.org/wiki/Least_significant_bit)
48−ordered [`++list`]() as atom of a [`++base`]().
49+Parser modifier: LSB
50+
51+Ordered `++list` as atom of a `++base`.
4952
5053Accepts
5154-------
5255
5356`wuc` is an atom.
5457
55−`tyd` is a [`++rule`]().
58+`tyd` is a `++rule`.
5659
5760Produces
5861--------
5962
60−A [`++rule`]().
63+A `++rule`.
6164
6265Source
6366------
6467
6568 ++ boss
66− |* [wuc=@ tyd=_rule]
69+ |* {wuc/@ tyd/rule}
6770 %+ cook
68− |= waq=(list ,@)
71+ |= waq/(list @)
6972 %+ reel
7073 waq
71− =|([p=@ q=@] |.((add p (mul wuc q))))
74+ =|({p/@ q/@} |.((add p (mul wuc q))))
7275 tyd
76+ ::
7377
7478Examples
7579--------
@@ -87,34 +91,33 @@ Examples
8791
8892Replace with constant
8993
90−Parser modifier. Accepts a [`++rule`]() `sef` and produces a parser that
94+Parser modifier. Accepts a `++rule` `sef` and produces a parser that
9195produces a constant `cus`, assuming `sef` is successful.
9296
9397Accepts
9498-------
9599
96−`cus` is a constant [noun]().
100+`cus` is a constant noun.
97101
98102`sef` is a `++rule`.
99103
100104Produces
101105--------
102106
103−An [`++edge`]().
107+An `++edge`.
104108
105109Source
106110------
107111
108− ++ cold :: replace w/ constant
112+ ++ cold :: replace w+ constant
109113 ~/ %cold
110− |* [cus=* sef=_rule]
114+ |* {cus/* sef/rule}
111115 ~/ %fun
112− |= tub=nail
116+ |= tub/nail
113117 =+ vex=(sef tub)
114118 ?~ q.vex
115119 vex
116120 [p=p.vex q=[~ u=[p=cus q=q.u.q.vex]]]
117− ::
118121
119122Examples
120123--------
@@ -132,28 +135,28 @@ Examples
132135Apply gate
133136
134137Parser modifier. Produces a parser that takes a (successful) result of a
135−[`++rule`]() `sef` and slams it through `poq`.
138+`++rule` `sef` and slams it through `poq`.
136139
137140Accepts
138141-------
139142
140−`poq` is a [gate]().
143+`poq` is a gate.
141144
142−`sef` is a [`++rule`]().
145+`sef` is a `++rule`.
143146
144147Produces
145148--------
146149
147−An [`++rule`]().
150+An `++rule`.
148151
149152Source
150153------
151154
152155 ++ cook :: apply gate
153156 ~/ %cook
154− |* [poq=_,* sef=_rule]
157+ |* {poq/$-(* *) sef/rule}
155158 ~/ %fun
156− |= tub=nail
159+ |= tub/nail
157160 =+ vex=(sef tub)
158161 ?~ q.vex
159162 vex
@@ -179,7 +182,7 @@ Examples
179182
180183Always parse
181184
182−Parser generator. Produces a parser that succeeds with given [noun]() `huf`
185+Parser generator. Produces a parser that succeeds with given noun `huf`
183186without consuming any text.
184187
185188Accepts
@@ -190,7 +193,7 @@ Accepts
190193Produces
191194--------
192195
193−A [`++rule`]().
196+A `++rule`.
194197
195198Source
196199------
@@ -221,13 +224,13 @@ Examples
221224
222225Parse to end
223226
224−Parser modifier. Accepts a [`++rule`]() `sef`, and produces a parser that succeeds only
227+Parser modifier. Accepts a `++rule` `sef`, and produces a parser that succeeds only
225228when the of `tub` is fully consumed using `sef`.
226229
227230Accepts
228231-------
229232
230−`sef` is a [`++rule`]().
233+`sef` is a `++rule`.
231234
232235Produces
233236--------
@@ -261,14 +264,14 @@ Examples
261264
262265Add to tape
263266
264−Parser modifier: prepend text to [`++tape`]() before applying parser.
267+Parser modifier: prepend text to `++tape` before applying parser.
265268
266269Accepts
267270-------
268271
269272`pre` is a `++tape`
270273
271−`sef` is a [`++rule`]()
274+`sef` is a `++rule`
272275
273276Produces
274277--------
@@ -279,10 +282,9 @@ Source
279282------
280283
281284 ++ funk :: add to tape first
282− |* [pre=tape sef=_rule]
283− |= tub=nail
285+ |* {pre/tape sef/rule}
286+ |= tub/nail
284287 (sef p.tub (weld pre q.tub))
285− ::
286288
287289Examples
288290--------
@@ -299,16 +301,16 @@ Examples
299301
300302Place-based apply
301303
302−Parser modifier. Similar to [`++cook`]() in that it produces a parser that takes a
304+Parser modifier. Similar to `++cook` in that it produces a parser that takes a
303305(successful) result of `sef` and slams it through `hez`. `hez` accepts a
304−[`++pint`]() `a` and a [noun]() `b`, which is what the parser parsed.
306+`++pint` `a` and a noun `b`, which is what the parser parsed.
305307
306308Accepts
307309-------
308310
309−`hez` is a [gate]().
311+`hez` is a gate.
310312
311−`sef` is a [`++rule`]()
313+`sef` is a `++rule`
312314
313315Produces
314316--------
@@ -320,9 +322,9 @@ Source
320322
321323 ++ here :: place-based apply
322324 ~/ %here
323− |* [hez=_|=([a=pint b=*] [a b]) sef=_rule]
325+ |* {hez/_|=({a/pint b/*} [a b]) sef/rule}
324326 ~/ %fun
325− |= tub=nail
327+ |= tub/nail
326328 =+ vex=(sef tub)
327329 ?~ q.vex
328330 vex
@@ -346,7 +348,7 @@ Examples
346348
347349Infix
348350
349−Parser modifier: surround with pair of [`++rule`]()s, the output of which is
351+Parser modifier: surround with pair of `++rule`s, the output of which is
350352discarded.
351353
352354Accepts
@@ -365,8 +367,12 @@ Source
365367------
366368
367369 ++ ifix
368− |* [fel=[p=_rule q=_rule] hof=_rule]
369− ;~(pfix p.fel ;~(sfix hof q.fel))
370+ |* {fel/{rule rule} hof/rule}
371+ ~! +<
372+ ~! +<:-.fel
373+ ~! +<:+.fel
374+ ;~(pfix -.fel ;~(sfix hof +.fel))
375+ ::
370376
371377Examples
372378--------
@@ -388,24 +394,24 @@ Match and consume a cord.
388394Accepts
389395-------
390396
391−`daf` is a [`@t`]().
397+`daf` is a `@t`.
392398
393399Produces
394400--------
395401
396−An [`++edge`]().
402+An `++edge`.
397403
398404Source
399405------
400406
401407 ++ jest :: match a cord
402− |= daf=@t
403− |= tub=nail
408+ |= daf/@t
409+ |= tub/nail
404410 =+ fad=daf
405− |- ^- (like ,@t)
406− ?: =(0 daf)
411+ |- ^- (like @t)
412+ ?: =(`@`0 daf)
407413 [p=p.tub q=[~ u=[p=fad q=tub]]]
408− ?: |(?=(~ q.tub) !=((end 3 1 daf) i.q.tub))
414+ ?: |(?=($~ q.tub) !=((end 3 1 daf) i.q.tub))
409415 (fail tub)
410416 $(p.tub (lust i.q.tub p.tub), q.tub t.q.tub, daf (rsh 3 1 daf))
411417 ::
@@ -438,21 +444,21 @@ Match and consume a single character.
438444Accepts
439445-------
440446
441−`daf` is a [`++char`]()
447+`daf` is a `++char`
442448
443449Produces
444450--------
445451
446−A [`++rule`]().
452+A `++rule`.
447453
448454Source
449455------
450456
451457 ++ just :: XX redundant, jest
452458 ~/ %just :: match a char
453− |= daf=char
459+ |= daf/char
454460 ~/ %fun
455− |= tub=nail
461+ |= tub/nail
456462 ^- (like char)
457463 ?~ q.tub
458464 (fail tub)
@@ -491,20 +497,20 @@ Accepts
491497
492498`gar` is a noun.
493499
494−`sef` is a [gate]() that accepts a [`++rule`]()
500+`sef` is a gate that accepts a `++rule`
495501
496502Produces
497503--------
498504
499−A [`++rule`]().
505+A `++rule`.
500506
501507Source
502508------
503509
504510 ++ knee :: callbacks
505− |* [gar=* sef=_|.(rule)]
506− |= tub=nail
507− ^- (like ,_gar)
511+ |* {gar/* sef/_|.(*rule)}
512+ |= tub/nail
513+ ^- (like _gar)
508514 ((sef) tub)
509515 ::
510516
@@ -545,25 +551,25 @@ characters.
545551Accepts
546552-------
547553
548−`bud` is a list of [`++char`]()
554+`bud` is a list of `++char`
549555
550556Produces
551557--------
552558
553−A [`++rule`]().
559+A `++rule`.
554560
555561Source
556562------
557563
558564 ++ mask :: match char in set
559565 ~/ %mask
560− |= bud=(list char)
566+ |= bud/(list char)
561567 ~/ %fun
562− |= tub=nail
568+ |= tub/nail
563569 ^- (like char)
564570 ?~ q.tub
565571 (fail tub)
566− ?. (lien bud |=(a=char =(i.q.tub a)))
572+ ?. (lien bud |=(a/char =(i.q.tub a)))
567573 (fail tub)
568574 (next tub)
569575 ::
@@ -587,7 +593,7 @@ Examples
587593
588594Parse list with delimiter
589595
590−Parser modifier: Parse a list of matches using a delimiter [`++rule`]().
596+Parser modifier: Parse a list of matches using a delimiter `++rule`.
591597
592598Accepts
593599-------
@@ -605,8 +611,9 @@ Source
605611------
606612
607613 ++ more
608− |* [bus=_rule fel=_rule]
614+ |* {bus/rule fel/rule}
609615 ;~(pose (most bus fel) (easy ~))
616+ ::
610617
611618Examples
612619--------
@@ -625,7 +632,7 @@ Examples
625632
626633Parse list of at least one match
627634
628−Parser modifier: parse a [`++list`]() of at least one match using a delimiter [`++rule`]().
635+Parser modifier: parse a `++list` of at least one match using a delimiter `++rule`.
629636
630637Accepts
631638-------
@@ -643,8 +650,9 @@ Source
643650------
644651
645652 ++ most
646− |* [bus=_rule fel=_rule]
653+ |* {bus/rule fel/rule}
647654 ;~(plug fel (star ;~(pfix bus fel)))
655+ ::
648656
649657Examples
650658--------
@@ -669,18 +677,18 @@ Consume any character, producing it as a result.
669677Accepts
670678-------
671679
672−`tub` is a [`++nail`]()
680+`tub` is a `++nail`
673681
674682Produces
675683--------
676684
677−An [`++edge`]().
685+An `++edge`.
678686
679687Source
680688------
681689
682690 ++ next :: consume a char
683− |= tub=nail
691+ |= tub/nail
684692 ^- (like char)
685693 ?~ q.tub
686694 (fail tub)
@@ -704,12 +712,12 @@ Examples
704712
705713List of at least one match.
706714
707−Parser modifier: parse [`++list`]() of at least one match.
715+Parser modifier: parse `++list` of at least one match.
708716
709717Accepts
710718-------
711719
712−`fel` is a [`++rule`]().
720+`fel` is a `++rule`.
713721
714722Produces
715723--------
@@ -719,7 +727,8 @@ A `++rule`.
719727Source
720728------
721729
722− ++ plus |*(fel=_rule ;~(plug fel (star fel)))
730+ ++ plus |*(fel/rule ;~(plug fel (star fel)))
731+
723732
724733Examples
725734--------
@@ -740,25 +749,24 @@ Examples
740749
741750Conditional `++cook`
742751
743−Conditional [`++cook`](). Slams the result through a gate that produces
752+Conditional `++cook`. Slams the result through a gate that produces
744753a unit; if that unit is empty, fail.
745754
746755Accepts
747756-------
748757
749−`tub` is a [`++nail`](/doc/hoon/library/1#++nail)
750−
758+`tub` is a `++nail`.
751759Produces
752760--------
753761
754−A [`++rule`]().
762+A `++rule`.
755763
756764Source
757765------
758766
759767 ++ sear :: conditional cook
760− |* [pyq=_|=(* *(unit)) sef=_rule]
761− |= tub=nail
768+ |* {pyq/$-(* (unit)) sef/rule}
769+ |= tub/nail
762770 =+ vex=(sef tub)
763771 ?~ q.vex
764772 vex
@@ -768,10 +776,11 @@ Source
768776 [p=p.vex q=[~ u=[p=u.gey q=q.u.q.vex]]]
769777 ::
770778
779+
771780Examples
772781--------
773782
774− ~zod/try=> ((sear |=(a=* ?@(a (some a) ~)) (just `a`)) [[1 1] "abc"])
783+ ~zod/try=> ((sear |=(a/* ?@(a (some a) ~)) (just `a`)) [[1 1] "abc"])
775784 [p=[p=1 q=2] q=[~ u=[p=97 q=[p=[p=1 q=2] q="bc"]]]]
776785 ~zod/try=> ((sear |=(* ~) (just 'a')) [[1 1] "abc"])
777786 [p=[p=1 q=2] q=~]
@@ -783,7 +792,7 @@ Examples
783792
784793Char in range
785794
786−Match characters ([`++char`]()) within a range.
795+Match characters (`++char`) within a range.
787796
788797Accepts
789798-------
@@ -795,16 +804,16 @@ Accepts
795804Produces
796805--------
797806
798−A [`++rule`]().
807+A `++rule`.
799808
800809Source
801810------
802811
803812 ++ shim :: match char in range
804813 ~/ %shim
805− |= [les=@ mos=@]
814+ |= {les/@ mos/@}
806815 ~/ %fun
807− |= tub=nail
816+ |= tub/nail
808817 ^- (like char)
809818 ?~ q.tub
810819 (fail tub)
@@ -830,13 +839,13 @@ Examples
830839
831840Use gate to parse delimited list
832841
833−Parser modifier: By composing with a [gate](), parse a delimited [`++list`]() of
842+Parser modifier: By composing with a gate, parse a delimited `++list` of
834843matches.
835844
836845Accepts
837846-------
838847
839−`bus` is a [`++rule`]().
848+`bus` is a `++rule`.
840849
841850`fel` is a `++rule`.
842851
@@ -849,16 +858,18 @@ Source
849858------
850859
851860 ++ slug
852− |* raq=_|*([a=* b=*] [a b])
853− |* [bus=_rule fel=_rule]
861+ |* raq/_|*({a/* b/*} [a b])
862+ |* {bus/rule fel/rule}
854863 ;~((comp raq) fel (stir +<+.raq raq ;~(pfix bus fel)))
864+ ::
865+
855866
856867Examples
857868--------
858869
859870 ~zod/try=> (scan "20+5+110" ((slug add) lus dem))
860871 135
861− ~zod/try=> `@t`(scan "a b c" ((slug |=(a=[@ @t] (cat 3 a))) ace alp))
872+ ~zod/try=> `@t`(scan "a b c" ((slug |=(a/[@ @t] (cat 3 a))) ace alp))
862873 'abc'
863874
864875
@@ -880,16 +891,16 @@ Accepts
880891Produces
881892--------
882893
883−A [`++rule`]().
894+A `++rule`.
884895
885896Source
886897------
887898
888899 ++ stag :: add a label
889900 ~/ %stag
890− |* [gob=* sef=_rule]
901+ |* {gob/* sef/rule}
891902 ~/ %fun
892− |= tub=nail
903+ |= tub/nail
893904 =+ vex=(sef tub)
894905 ?~ q.vex
895906 vex
@@ -913,19 +924,19 @@ Examples
913924
914925List of matches
915926
916−Parser modifier: parse [`++list`]() of matches.
927+Parser modifier: parse `++list` of matches.
917928
918929Accepts
919930-------
920931
921−`fel` is a [`++rule`]().
932+`fel` is a `++rule`.
922933
923934Produces
924935--------
925936
926937 ++ star :: 0 or more times
927− |* fel=_rule
928− (stir `(list ,_(wonk *fel))`~ |*([a=* b=*] [a b]) fel)
938+ |* fel/rule
939+ (stir `(list _(wonk *fel))`~ |*({a/* b/*} [a b]) fel)
929940
930941Examples
931942--------
@@ -968,7 +979,7 @@ Source
968979------
969980
970981 ++ stet
971− |* leh=(list ,[?(@ [@ @]) _rule])
982+ |* leh/(list {?(@ {@ @}) rule})
972983 |-
973984 ?~ leh
974985 ~
@@ -1006,14 +1017,14 @@ Switch by first
10061017
10071018 ++ stew :: switch by first char
10081019 ~/ %stew
1009− |* leh=(list ,[p=?(@ [@ @]) q=_rule]) :: char/range keys
1020+ |* leh/(list {p/?(@ {@ @}) q/rule}) :: char+range keys
10101021 =+ ^= wor :: range complete lth
1011− |= [ort=?(@ [@ @]) wan=?(@ [@ @])]
1022+ |= {ort/?(@ {@ @}) wan/?(@ {@ @})}
10121023 ?@ ort
10131024 ?@(wan (lth ort wan) (lth ort -.wan))
10141025 ?@(wan (lth +.ort wan) (lth +.ort -.wan))
10151026 =+ ^= hel :: build parser map
1016− =+ hel=`(tree $_(?>(?=(^ leh) i.leh)))`~
1027+ =+ hel=`(tree _?>(?=(^ leh) i.leh))`~
10171028 |- ^+ hel
10181029 ?~ leh
10191030 ~
@@ -1033,7 +1044,7 @@ Switch by first
10331044 [n.yal l.yal nuc]
10341045 [n.nuc [n.yal l.yal l.nuc] r.nuc]
10351046 ~% %fun ..^$ ~
1036− |= tub=nail
1047+ |= tub/nail
10371048 ?~ q.tub
10381049 (fail tub)
10391050 |-
@@ -1049,8 +1060,10 @@ Switch by first
10491060 $(hel r.hel)
10501061 ::
10511062
1052−Parser generator. From an associative [`++list`]() of characters or character
1053−ranges to [`++rule`]()s, construct a [`++map`](), and parse [`++tape`]()s only
1063+
1064+
1065+Parser generator. From an associative `++list` of characters or character
1066+ranges to `++rule`s, construct a `++map`, and parse `++tape`s only
10541067with `++rules` associated with a range that the `++tape`'s first character falls in.
10551068
10561069
@@ -1060,7 +1073,7 @@ with `++rules` associated with a range that the `++tape`'s first character falls
10601073
10611074Parse repeatedly
10621075
1063−Parse with [`++rule`]() as many times as possible, and fold over results with a
1076+Parse with `++rule` as many times as possible, and fold over results with a
10641077binary gate.
10651078
10661079Accepts
@@ -1080,19 +1093,26 @@ A rule.
10801093Source
10811094------
10821095
1083−++ stir :: parse repeatedly
1084− ~/ %stir
1085− |* [rud=* raq=_|*([a=* b=*] [a b]) fel=_rule]
1086− ~/ %fun
1087− |= tub=nail
1088− ^- (like ,_rud)
1096+ ++ stun :: parse several times
1097+ |* {lig/{@ @} fel/rule}
1098+ |= tub/nail
1099+ ^- (like (list _(wonk (fel))))
1100+ ?: =(0 +.lig)
1101+ [p.tub [~ ~ tub]]
10891102 =+ vex=(fel tub)
10901103 ?~ q.vex
1091− [p.vex [~ rud tub]]
1092− =+ wag=$(tub q.u.q.vex)
1093− ?> ?=(^ q.wag)
1094− [(last p.vex p.wag) [~ (raq p.u.q.vex p.u.q.wag) q.u.q.wag]]
1095− ::
1104+ ?: =(0 -.lig)
1105+ [p.vex [~ ~ tub]]
1106+ vex
1107+ =+ ^= wag %= $
1108+ -.lig ?:(=(0 -.lig) 0 (dec -.lig))
1109+ +.lig ?:(=(0 +.lig) 0 (dec +.lig))
1110+ tub q.u.q.vex
1111+ ==
1112+ ?~ q.wag
1113+ wag
1114+ [p.wag [~ [p.u.q.vex p.u.q.wag] q.u.q.wag]]
1115+
10961116
10971117Examples
10981118--------
@@ -1116,30 +1136,30 @@ Accepts
11161136
11171137`[les=@ mos=@]` is a cell of atoms indicating the bounds.
11181138
1119−`fel` is a [`++rule`]().
1139+`fel` is a `++rule`.
11201140
11211141Produces
11221142--------
11231143
1124−A [`++rule`]().
1144+A `++rule`.
11251145
11261146Source
11271147------
11281148
11291149 ++ stun :: parse several times
1130− |* [[les=@ mos=@] fel=_rule]
1131− |= tub=nail
1132− ^- (like (list ,_(wonk (fel))))
1133− ?: =(0 mos)
1150+ |* {lig/{@ @} fel/rule}
1151+ |= tub/nail
1152+ ^- (like (list _(wonk (fel))))
1153+ ?: =(0 +.lig)
11341154 [p.tub [~ ~ tub]]
11351155 =+ vex=(fel tub)
11361156 ?~ q.vex
1137− ?: =(0 les)
1157+ ?: =(0 -.lig)
11381158 [p.vex [~ ~ tub]]
11391159 vex
11401160 =+ ^= wag %= $
1141− les ?:(=(0 les) 0 (dec les))
1142− mos ?:(=(0 mos) 0 (dec mos))
1161+ -.lig ?:(=(0 -.lig) 0 (dec -.lig))
1162+ +.lig ?:(=(0 +.lig) 0 (dec +.lig))
11431163 tub q.u.q.vex
11441164 ==
11451165 ?~ q.wag
docs/system/hoon/library/4g.md+14−11
@@ -3,7 +3,7 @@
33
44Parse or crash
55
6−Parse a cord with a given [`++rule`]() and crash if the [`++cord`]() isn't entirely
6+Parse a cord with a given `++rule` and crash if the `++cord` isn't entirely
77parsed.
88
99Accepts
@@ -21,7 +21,8 @@ The value of the parse result, or crash.
2121Source
2222------
2323
24− ++ rash |*([naf=@ sab=_rule] (scan (trip naf) sab)) ::
24+ ++ rash |*({naf/@ sab/rule} (scan (trip naf) sab)) ::
25+
2526
2627Examples
2728--------
@@ -52,9 +53,9 @@ entirely parsed.
5253Accepts
5354-------
5455
55−`naf` is an [atom]().
56+`naf` is an atom.
5657
57−`sab` is a [rule]().
58+`sab` is a rule.
5859
5960Produces
6061--------
@@ -64,7 +65,8 @@ The value of the parse result, or null.
6465Source
6566------
6667
67− ++ rush |*([naf=@ sab=_rule] (rust (trip naf) sab))
68+ ++ rush |*({naf/@ sab/rule} (rust (trip naf) sab))
69+
6870
6971Examples
7072--------
@@ -87,7 +89,7 @@ Examples
8789
8890Parse tape or null
8991
90−Parse a [`++tape`]() with a given [`++rule`]() and produce null if the `++tape` isn't
92+Parse a `++tape` with a given `++rule` and produce null if the `++tape` isn't
9193entirely parsed.
9294
9395Accepts
@@ -105,10 +107,11 @@ A `(unit ,@t)`
105107Source
106108------
107109
108− ++ rust |* [los=tape sab=_rule]
110+ ++ rust |* {los/tape sab/rule}
109111 =+ vex=((full sab) [[1 1] los])
110112 ?~(q.vex ~ [~ u=p.u.q.vex])
111113
114+
112115Examples
113116--------
114117
@@ -126,15 +129,15 @@ Examples
126129
127130Parse tape or crash
128131
129−Parse a [`++tape`]() with a given [`++rule`]() and crash if the `++tape` isn't entirely
132+Parse a `++tape` with a given `++rule` and crash if the `++tape` isn't entirely
130133parsed.
131134
132135Accepts
133136-------
134137
135−`los` is a [tape]().
138+`los` is a tape.
136139
137−`sab` is a [rule]().
140+`sab` is a rule.
138141
139142Produces
140143--------
@@ -144,7 +147,7 @@ Either a `++tape` or a crash.
144147Source
145148------
146149
147− ++ scan |* [los=tape sab=_rule]
150+ ++ scan |* {los/tape sab/rule}
148151 =+ vex=((full sab) [[1 1] los])
149152 ?~ q.vex
150153 ~_ (show [%m '{%d %d}'] p.p.vex q.p.vex ~)
docs/system/hoon/library/4j.md+71−70
@@ -23,7 +23,7 @@ Examples
2323
2424Parse hex pair
2525
26−Parsing [`++rule`](). Parses a pair of base-16 digits. Used in escapes.
26+Parsing `++rule`. Parses a pair of base-16 digits. Used in escapes.
2727
2828Accepts
2929-------
@@ -56,7 +56,7 @@ Examples
5656
5757Parse phonetic pair
5858
59−Parsing [`++rule`](). Parses an atom of [odor]() [`@pE`](), a phrase of two bytes
59+Parsing `++rule`. Parses an atom of odor `@pE`, a phrase of two bytes
6060encoded phonetically.
6161
6262Accepts
@@ -88,7 +88,7 @@ Examples
8888
8989Parse two phonetic pairs
9090
91−Parsing [`++rule`](). Parses and unscrambles an atom of odor [@pF](), a phrase
91+Parsing `++rule`. Parses and unscrambles an atom of odor @pF, a phrase
9292of two two-byte pairs that are encoded (and scrambled) phonetically.
9393
9494Accepts
@@ -105,7 +105,7 @@ Source
105105------
106106
107107 ++ huf %+ cook
108− |=([a=@ b=@] (wred:un ~(zug mu ~(zag mu [a b]))))
108+ |=([a/@ b/@] (wred:un ~(zug mu ~(zag mu [a b]))))
109109 ;~(plug hif ;~(pfix hep hif))
110110
111111Examples
@@ -124,13 +124,13 @@ Examples
124124
125125Parse 8 phonetic bytes
126126
127−Parsing [`++rule`](). Parses an atom of odor [@pG](), a phrase of eight of
127+Parsing `++rule`. Parses an atom of odor @pG, a phrase of eight of
128128phonetic bytes.
129129
130130Accepts
131131-------
132132
133−An atom of odor [`@pG`]()
133+An atom of odor `@pG`
134134
135135Produces
136136--------
@@ -156,12 +156,12 @@ Examples
156156
157157Parse \<= 5 base-32
158158
159−Parsing [`++rule`](). Parses up to five base-32 digits without a leading zero.
159+Parsing `++rule`. Parses up to five base-32 digits without a leading zero.
160160
161161Accepts
162162-------
163163
164−Up to five [@uv]() (base 64) digits.
164+Up to five @uv (base 64) digits.
165165
166166Produces
167167--------
@@ -192,12 +192,12 @@ Examples
192192
193193Parse \<= 5 base-64
194194
195−Parsing [`++rule`](). Parses up to five base-64 digits without a leading zero.
195+Parsing `++rule`. Parses up to five base-64 digits without a leading zero.
196196
197197Accepts
198198-------
199199
200−Up to five [@uw]() (base 64) digits.
200+Up to five @uw (base 64) digits.
201201
202202Produces
203203--------
@@ -231,7 +231,7 @@ Examples
231231
232232Parse 5 base-32
233233
234−Parsing [`++rule`](). Parses exactly five base-32 digits.
234+Parsing `++rule`. Parses exactly five base-32 digits.
235235
236236Accepts
237237-------
@@ -259,7 +259,7 @@ Examples
259259
260260Parse 5 base-64
261261
262−Parsing [`++rule`](). Parses exactly five base-64 digits.
262+Parsing `++rule`. Parses exactly five base-64 digits.
263263
264264Accepts
265265-------
@@ -267,8 +267,6 @@ Accepts
267267Produces
268268--------
269269
270−My name henry let's see how fast I can type.
271−
272270Source
273271------
274272
@@ -289,7 +287,7 @@ Examples
289287
290288Parse \<= 4 binary
291289
292−Parsing [`++rule`](). Parses a binary number of up to 4 digits in length without
290+Parsing `++rule`. Parses a binary number of up to 4 digits in length without
293291a leading zero.
294292
295293Accepts
@@ -325,7 +323,7 @@ Examples
325323
326324Parse \<= 4 hex
327325
328−Parsing [`++rule`](). Parses a hexadecimal number of up to 4 digits in length
326+Parsing `++rule`. Parses a hexadecimal number of up to 4 digits in length
329327without a leading zero.
330328
331329Accepts
@@ -359,7 +357,7 @@ Examples
359357
360358Parse 4 binary
361359
362−Parsing [`++rule`](). Parses exactly four binary digits.
360+Parsing `++rule`. Parses exactly four binary digits.
363361
364362Accepts
365363-------
@@ -389,7 +387,7 @@ Examples
389387
390388Parse 4 hex
391389
392−Parsing [`++rule`](). Parses exactly four hexadecimal digits.
390+Parsing `++rule`. Parses exactly four hexadecimal digits.
393391
394392Accepts
395393-------
@@ -419,7 +417,7 @@ Examples
419417
420418Parse 1
421419
422−Parsing [`++rule`](). Parses the number 1.
420+Parsing `++rule`. Parses the number 1.
423421
424422Accepts
425423-------
@@ -450,7 +448,7 @@ Examples
450448
451449Parse decimal
452450
453−Parsing [`++rule`](). Parses a nonzero decimal digit.
451+Parsing `++rule`. Parses a nonzero decimal digit.
454452
455453Accepts
456454-------
@@ -461,7 +459,7 @@ Produces
461459Source
462460------
463461
464− ++ sed (cook |=(a=@ (sub a '0')) (shim '1' '9'))
462+ ++ sed (cook |=(a/@ (sub a '0')) (shim '1' '9'))
465463
466464Examples
467465--------
@@ -478,7 +476,7 @@ Examples
478476
479477Parse base-32
480478
481−Parsing [`++rule`](). Parses a nonzero base-32 digit
479+Parsing `++rule`. Parses a nonzero base-32 digit
482480
483481Accepts
484482-------
@@ -506,7 +504,7 @@ Examples
506504
507505Parse base-64
508506
509−Parsing [`++rule`](). Parses a nonzero base-64 digit
507+Parsing `++rule`. Parses a nonzero base-64 digit
510508
511509Accepts
512510-------
@@ -534,7 +532,7 @@ Examples
534532
535533Parse hex
536534
537−Parsing [`++rule`](). Parses a nonzero hexadecimal digit.
535+Parsing `++rule`. Parses a nonzero hexadecimal digit.
538536
539537Accepts
540538-------
@@ -562,7 +560,7 @@ Examples
562560
563561Parse binary
564562
565−Parsing [`++rule`](). Parses a binary digit.
563+Parsing `++rule`. Parses a binary digit.
566564
567565Accepts
568566-------
@@ -573,7 +571,7 @@ Produces
573571Source
574572------
575573
576− ++ sib (cook |=(a=@ (sub a '0')) (shim '0' '1'))
574+ ++ sib (cook |=(a/@ (sub a '0')) (shim '0' '1'))
577575
578576Examples
579577--------
@@ -589,7 +587,7 @@ Examples
589587
590588Parse decimal
591589
592−Parsing [`++rule`](). Parses a decimal digit.
590+Parsing `++rule`. Parses a decimal digit.
593591
594592Accepts
595593-------
@@ -600,7 +598,7 @@ Produces
600598Source
601599------
602600
603− ++ sid (cook |=(a=@ (sub a '0')) (shim '0' '9'))
601+ ++ sid (cook |=(a/@ (sub a '0')) (shim '0' '9'))
604602
605603Examples
606604--------
@@ -614,7 +612,7 @@ Examples
614612
615613Parse base-32
616614
617−Parsing [`++rule`](). Parses a base-32 digit.
615+Parsing `++rule`. Parses a base-32 digit.
618616
619617Accepts
620618-------
@@ -639,7 +637,7 @@ Examples
639637
640638Parse base-64
641639
642−Parsing [`++rule`](). Parses a base-64 digit.
640+Parsing `++rule`. Parses a base-64 digit.
643641
644642Accepts
645643-------
@@ -664,7 +662,7 @@ Examples
664662
665663Parse hex
666664
667−Parsing [`++rule`](). Parses a hexadecimal digit.
665+Parsing `++rule`. Parses a hexadecimal digit.
668666
669667Accepts
670668-------
@@ -689,7 +687,7 @@ Examples
689687
690688Parse base-32
691689
692−Parsing [`++rule`](). Parses a base-32 letter.
690+Parsing `++rule`. Parses a base-32 letter.
693691
694692Accepts
695693-------
@@ -700,7 +698,7 @@ Produces
700698Source
701699------
702700
703− ++ sov (cook |=(a=@ (sub a 87)) (shim 'a' 'v'))
701+ ++ sov (cook |=(a/@ (sub a 87)) (shim 'a' 'v'))
704702
705703Examples
706704--------
@@ -714,7 +712,7 @@ Examples
714712
715713Parse base-64
716714
717−Parsing [`++rule`](). Parses a base-64 letter/symbol.
715+Parsing `++rule`. Parses a base-64 letter/symbol.
718716
719717Accepts
720718-------
@@ -726,8 +724,8 @@ Source
726724------
727725
728726 ++ sow ;~ pose
729− (cook |=(a=@ (sub a 87)) (shim 'a' 'z'))
730− (cook |=(a=@ (sub a 29)) (shim 'A' 'Z'))
727+ (cook |=(a/@ (sub a 87)) (shim 'a' 'z'))
728+ (cook |=(a/@ (sub a 29)) (shim 'A' 'Z'))
731729 (cold 62 (just '-'))
732730 (cold 63 (just '~'))
733731 ==
@@ -744,7 +742,7 @@ Examples
744742
745743Parse hex letter
746744
747−Parsing [`++rule`](). Parses a hexadecimal letter.
745+Parsing `++rule`. Parses a hexadecimal letter.
748746
749747Accepts
750748-------
@@ -755,7 +753,7 @@ Produces
755753Source
756754------
757755
758− ++ sox (cook |=(a=@ (sub a 87)) (shim 'a' 'f'))
756+ ++ sox (cook |=(a/@ (sub a 87)) (shim 'a' 'f'))
759757
760758Examples
761759--------
@@ -769,7 +767,7 @@ Examples
769767
770768Parse \<= 3 decimal
771769
772−Parsing [`++rule`](). Parses a decimal number of up to 3 digits without a
770+Parsing `++rule`. Parses a decimal number of up to 3 digits without a
773771leading zero.
774772
775773Accepts
@@ -802,7 +800,7 @@ Examples
802800
803801Leading phonetic byte
804802
805−Parsing [`++rule`](). Parses the leading phonetic byte, which represents a
803+Parsing `++rule`. Parses the leading phonetic byte, which represents a
806804syllable.
807805
808806Accepts
@@ -814,7 +812,7 @@ Produces
814812Source
815813------
816814
817− ++ tip (sear |=(a=@ (ins:po a)) til)
815+ ++ tip (sear |=(a/@ (ins:po a)) til)
818816
819817Examples
820818--------
@@ -830,7 +828,7 @@ Examples
830828
831829Trailing phonetic syllable
832830
833−Parsing [`++rule`](). Parses the trailing phonetic byte, which represents a
831+Parsing `++rule`. Parses the trailing phonetic byte, which represents a
834832syllable.
835833
836834Accepts
@@ -842,7 +840,7 @@ Produces
842840Source
843841------
844842
845− ++ tiq (sear |=(a=@ (ind:po a)) til)
843+ ++ tiq (sear |=(a/@ (ind:po a)) til)
846844
847845Examples
848846--------
@@ -858,7 +856,7 @@ Examples
858856
859857Parse 3 decimal digits
860858
861−Parsing [`++rule`](). Parses exactly three decimal digits.
859+Parsing `++rule`. Parses exactly three decimal digits.
862860
863861Accepts
864862-------
@@ -886,7 +884,7 @@ Examples
886884
887885Parse 3 lowercase
888886
889−Parsing [`++rule`](). Parses exactly three lowercase letters.
887+Parsing `++rule`. Parses exactly three lowercase letters.
890888
891889Accepts
892890-------
@@ -916,7 +914,7 @@ Examples
916914
917915Parse span characters
918916
919−Parsing rule. Parses characters from an atom of the span odor [`@ta`]().
917+Parsing rule. Parses characters from an atom of the span odor `@ta`.
920918
921919Accepts
922920-------
@@ -928,7 +926,7 @@ Source
928926------
929927
930928 ++ urs %+ cook
931− |=(a=tape (rap 3 ^-((list ,@) a)))
929+ |=(a/tape (rap 3 ^-((list @) a)))
932930 (star ;~(pose nud low hep dot sig cab))
933931
934932Examples
@@ -945,7 +943,7 @@ Examples
945943
946944Parse non-`_` span
947945
948−Parsing rule. Parses all characters of the span odor [`@ta`]() except
946+Parsing rule. Parses all characters of the span odor `@ta` except
949947for cab, `_`.
950948
951949Accepts
@@ -958,7 +956,7 @@ Source
958956------
959957
960958 ++ urt %+ cook
961− |=(a=tape (rap 3 ^-((list ,@) a)))
959+ |=(a/tape (rap 3 ^-((list @) a)))
962960 (star ;~(pose nud low hep dot sig))
963961
964962Examples
@@ -1035,12 +1033,13 @@ Accepts
10351033Produces
10361034--------
10371035
1038−`fel` is a [`rule`]().
1036+`fel` is a `rule`.
10391037
10401038Source
10411039------
10421040
1043− ++ ape |*(fel=_rule ;~(pose (cold 0 (just '0')) fel))
1041+ ++ ape |*(fel/rule ;~(pose (cold 0 (just '0')) fel))
1042+
10441043
10451044Examples
10461045--------
@@ -1079,7 +1078,7 @@ Examples
10791078
10801079Parse IPv6
10811080
1082−Parsing rule. Parses a [`@is`](), an IPv6 address.
1081+Parsing rule. Parses a `@is`, an IPv6 address.
10831082
10841083Accepts
10851084-------
@@ -1120,6 +1119,7 @@ Source
11201119
11211120 ++ dem (ape (bass 1.000 ;~(plug ted:ab (star ;~(pfix dog tid:ab)))))
11221121
1122+
11231123Examples
11241124--------
11251125
@@ -1191,7 +1191,7 @@ Examples
11911191
11921192Parse phonetic base
11931193
1194−Parsing rule. Parses an atom of odor [`@p`](), the phonetic base.
1194+Parsing rule. Parses an atom of odor `@p`, the phonetic base.
11951195
11961196Accepts
11971197-------
@@ -1370,7 +1370,7 @@ Examples
13701370
13711371Core used to scramble 16-bit atoms
13721372
1373−A [door]() that contains arms that are used to scramble two atoms, `top`
1373+A door that contains arms that are used to scramble two atoms, `top`
13741374and `bot`. Used especially in the phonetic base to disguise the
13751375relationship between a destroyer and its cruiser.
13761376
@@ -1380,15 +1380,15 @@ Accepts
13801380Produces
13811381--------
13821382
1383−`bot` is an [atom]().
1383+`bot` is an atom.
13841384
1385−`top` is an [atom]().
1385+`top` is an atom.
13861386
13871387Source
13881388------
13891389
13901390 ++ mu
1391− |_ [top=@ bot=@]
1391+ |_ [top/@ bot/@]
13921392
13931393Examples
13941394--------
@@ -1412,15 +1412,16 @@ Accepts
14121412Produces
14131413--------
14141414
1415−`bot` is an [atom]().
1415+`bot` is an atom.
14161416
1417−`top` is an [atom]().
1417+`top` is an atom.
14181418
14191419Source
14201420------
14211421
14221422 ++ zag [p=(end 4 1 (add top bot)) q=bot]
14231423
1424+
14241425Examples
14251426--------
14261427
@@ -1433,7 +1434,7 @@ Examples
14331434
14341435Subtract bottom from top
14351436
1436−The inverse of [`++zag`](). Produces the cell of `top` and `bot` with
1437+The inverse of `++zag`. Produces the cell of `top` and `bot` with
14371438`top` unscrambled. The unscrambled `top` is the sum of the sample `top`
14381439and the 16-bit complement of `bot`. Used to unscramble the name of the
14391440destroyer.
@@ -1444,9 +1445,9 @@ Accepts
14441445Produces
14451446--------
14461447
1447−`bot` is an [atom]().
1448+`bot` is an atom.
14481449
1449−`top` is an [atom]().
1450+`top` is an atom.
14501451
14511452Source
14521453------
@@ -1474,9 +1475,9 @@ Accepts
14741475Produces
14751476--------
14761477
1477−`bot` is an [atom]().
1478+`bot` is an atom.
14781479
1479−`top` is an [atom]().
1480+`top` is an atom.
14801481
14811482Source
14821483------
@@ -1496,7 +1497,7 @@ Examples
14961497
14971498Digit rendering engine
14981499
1499−A [door]() containing arms that render digits at bases 10, 16, 32, and
1500+A door containing arms that render digits at bases 10, 16, 32, and
1500150164.
15011502
15021503Accepts
@@ -1505,13 +1506,13 @@ Accepts
15051506Produces
15061507--------
15071508
1508−`tig` is an [`atom`]().
1509+`tig` is an `atom`.
15091510
15101511Source
15111512------
15121513
15131514 ++ ne
1514− |_ tig=@
1515+ |_ tig/@
15151516
15161517Examples
15171518--------
@@ -1533,7 +1534,7 @@ Accepts
15331534Produces
15341535--------
15351536
1536−`tig` is an [`atom`]().
1537+`tig` is an `atom`.
15371538
15381539Source
15391540------
@@ -1560,7 +1561,7 @@ Accepts
15601561Produces
15611562--------
15621563
1563−`tig` is an [`atom`]().
1564+`tig` is an `atom`.
15641565
15651566Source
15661567------
@@ -1618,7 +1619,7 @@ Accepts
16181619Produces
16191620--------
16201621
1621−`tig` is an [`atom`]().
1622+`tig` is an `atom`.
16221623
16231624Source
16241625------
docs/system/hoon/library/4k.md+273−347
@@ -1,4 +1,267 @@
11# 4k: atom printing
2+### `++co`
3+
4+Literal rendering engine
5+
6+A door that contains arms that operate on the sample coin `lot`.
7+
8+Accepts
9+-------
10+
11+Produces
12+--------
13+
14+`lot` is a `++coin`.
15+
16+Source
17+------
18+
19+ ++ co !.
20+ ~% %co ..co ~
21+ =< |_ lot/coin
22+
23+
24+Examples
25+--------
26+
27+ ~zod/try=> < 3.nta
28+ { lot/{$many {$~ $ta @t} {$~ $ud @ud} $~}
29+ <10.cfg 4.jjn {rep/"" <402.arm 110.jyx 1.ztu $151>}>
30+ }
31+ >
32+
33+------------------------------------------------------------------------
34+
35+### `++rear`
36+
37+Prepend & render as tape
38+
39+Renders a coin `lot` as a tape prepended to the sample tape `rom`.
40+
41+Accepts
42+-------
43+
44+Produces
45+--------
46+
47+`rom` is a `pe`
48+
49+`lot` is a `++coin`.
50+
51+Source
52+------
53+
54+ ++ rear |=(rom/tape =>(.(rex rom) rend))
55+
56+Examples
57+--------
58+
59+ ~zod/try=> (~(rear co %$ %ux 200) "--ha")
60+ "0xc8--ha"
61+
62+------------------------------------------------------------------------
63+
64+### `++rent`
65+
66+Render as span
67+
68+Renders a coin `lot` as a span.
69+
70+Accepts
71+-------
72+
73+Produces
74+--------
75+
76+`lot` is a `++coin`.
77+
78+Source
79+------
80+
81+ ++ rent `@ta`(rap 3 rend)
82+
83+Examples
84+--------
85+
86+ ~zod/try=> ~(rent co %$ %ux 200)
87+ ~.0xc8
88+ ~zod/try=> `@t`~(rent co %$ %ux 200)
89+ '0xc8'
90+
91+------------------------------------------------------------------------
92+
93+### `++rend`
94+
95+Render as tape
96+
97+Renders a coin `lot` as a tape.
98+
99+Accepts
100+-------
101+
102+Produces
103+--------
104+
105+`lot` is a `++coin`.
106+
107+Source
108+------
109+
110+ ++ rend
111+ ^- tape
112+ ?: ?=($blob -.lot)
113+ ['~' '0' ((v-co 1) (jam p.lot))]
114+ ?: ?=($many -.lot)
115+ :- '.'
116+ |- ^- tape
117+ ?~ p.lot
118+ ['_' '_' rep]
119+ ['_' (weld (trip (wack rent(lot i.p.lot))) $(p.lot t.p.lot))]
120+ =+ [yed=(end 3 1 p.p.lot) hay=(cut 3 [1 1] p.p.lot)]
121+ |- ^- tape
122+ ?+ yed (z-co q.p.lot)
123+ $c ['~' '-' (weld (rip 3 (wood (tuft q.p.lot))) rep)]
124+ $d
125+ ?+ hay (z-co q.p.lot)
126+ $a
127+ =+ yod=(yore q.p.lot)
128+ => ^+(. .(rep ?~(f.t.yod rep ['.' (s-co f.t.yod)])))
129+ => ^+ .
130+ %= .
131+ rep
132+ ?: &(=(~ f.t.yod) =(0 h.t.yod) =(0 m.t.yod) =(0 s.t.yod))
133+ rep
134+ => .(rep ['.' (y-co s.t.yod)])
135+ => .(rep ['.' (y-co m.t.yod)])
136+ ['.' '.' (y-co h.t.yod)]
137+ ==
138+ => .(rep ['.' (a-co d.t.yod)])
139+ => .(rep ['.' (a-co m.yod)])
140+ => .(rep ?:(a.yod rep ['-' rep]))
141+ ['~' (a-co y.yod)]
142+ ::
143+ $r
144+ =+ yug=(yell q.p.lot)
145+ => ^+(. .(rep ?~(f.yug rep ['.' (s-co f.yug)])))
146+ :- '~'
147+ ?: &(=(0 d.yug) =(0 m.yug) =(0 h.yug) =(0 s.yug))
148+ ['s' '0' rep]
149+ => ^+(. ?:(=(0 s.yug) . .(rep ['.' 's' (a-co s.yug)])))
150+ => ^+(. ?:(=(0 m.yug) . .(rep ['.' 'm' (a-co m.yug)])))
151+ => ^+(. ?:(=(0 h.yug) . .(rep ['.' 'h' (a-co h.yug)])))
152+ => ^+(. ?:(=(0 d.yug) . .(rep ['.' 'd' (a-co d.yug)])))
153+ +.rep
154+ ==
155+ ::
156+ $f
157+ ?: =(& q.p.lot)
158+ ['.' 'y' rep]
159+ ?:(=(| q.p.lot) ['.' 'n' rep] (z-co q.p.lot))
160+ ::
161+ $n ['~' rep]
162+ $i
163+ ?+ hay (z-co q.p.lot)
164+ $f ((ro-co [3 10 4] |=(a/@ ~(d ne a))) q.p.lot)
165+ $s ((ro-co [4 16 8] |=(a/@ ~(x ne a))) q.p.lot)
166+ ==
167+ ::
168+ $p
169+ =+ dyx=(met 3 q.p.lot)
170+ :- '~'
171+ ?: (lte dyx 1)
172+ (weld (trip (tod:po q.p.lot)) rep)
173+ ?: =(2 dyx)
174+ ;: weld
175+ (trip (tos:po (end 3 1 q.p.lot)))
176+ (trip (tod:po (rsh 3 1 q.p.lot)))
177+ rep
178+ ==
179+ =+ [dyz=(met 5 q.p.lot) fin=| dub=&]
180+ |- ^- tape
181+ ?: =(0 dyz)
182+ rep
183+ %= $
184+ fin &
185+ dub !dub
186+ dyz (dec dyz)
187+ q.p.lot (rsh 5 1 q.p.lot)
188+ rep
189+ =+ syb=(wren:un (end 5 1 q.p.lot))
190+ =+ cog=~(zig mu [(rsh 4 1 syb) (end 4 1 syb)])
191+ ;: weld
192+ (trip (tos:po (end 3 1 p.cog)))
193+ (trip (tod:po (rsh 3 1 p.cog)))
194+ `tape`['-' ~]
195+ (trip (tos:po (end 3 1 q.cog)))
196+ (trip (tod:po (rsh 3 1 q.cog)))
197+ `tape`?.(fin ~ ['-' ?.(dub ~ ['-' ~])])
198+ rep
199+ ==
200+ ==
201+ ::
202+ $r
203+ ?+ hay (z-co q.p.lot)
204+ $d ['.' '~' (r-co (rlyd q.p.lot))]
205+ $h ['.' '~' '~' (r-co (rlyh q.p.lot))]
206+ $q ['.' '~' '~' '~' (r-co (rlyq q.p.lot))]
207+ $s ['.' (r-co (rlys q.p.lot))]
208+ ==
209+ ::
210+ $u
211+ ?: ?=($c hay)
212+ %+ welp ['0' 'c' (reap (pad:fa q.p.lot) '1')]
213+ (c-co (enc:fa q.p.lot))
214+ =- (weld p.gam ?:(=(0 q.p.lot) `tape`['0' ~] q.gam))
215+ ^= gam ^- {p/tape q/tape}
216+ ?+ hay [~ ((ox-co [10 3] |=(a/@ ~(d ne a))) q.p.lot)]
217+ $b [['0' 'b' ~] ((ox-co [2 4] |=(a/@ ~(d ne a))) q.p.lot)]
218+ $i [['0' 'i' ~] ((d-co 1) q.p.lot)]
219+ $x [['0' 'x' ~] ((ox-co [16 4] |=(a/@ ~(x ne a))) q.p.lot)]
220+ $v [['0' 'v' ~] ((ox-co [32 5] |=(a/@ ~(x ne a))) q.p.lot)]
221+ $w [['0' 'w' ~] ((ox-co [64 5] |=(a/@ ~(w ne a))) q.p.lot)]
222+ ==
223+ ::
224+ $s
225+ %+ weld
226+ ?:((syn:si q.p.lot) "--" "-")
227+ $(yed 'u', q.p.lot (abs:si q.p.lot))
228+ ::
229+ $t
230+ ?: =('a' hay)
231+ ?: =('s' (cut 3 [2 1] p.p.lot))
232+ (weld (rip 3 q.p.lot) rep)
233+ ['~' '.' (weld (rip 3 q.p.lot) rep)]
234+ ['~' '~' (weld (rip 3 (wood q.p.lot)) rep)]
235+ ==
236+ --
237+
238+Examples
239+--------
240+
241+ ~zod/try=> ~(rend co ~ %ux 200)
242+ "0xc8"
243+ ~zod/try=> ~(rend co %many ~[[%$ ux+200] [%$ p+40]])
244+ "._0xc8_~~tem__"
245+ ~zod/try=> ~(rend co ~ %p 32.819)
246+ "~pillyt"
247+ ~zod/try=> ~(rend co ~ %ux 18)
248+ "0x12"
249+ ~zod/try=> ~(rend co [~ p=[p=%if q=0x7f00.0001]])
250+ ".127.0.0.1"
251+ ~zod/try=> `@ux`.127.0.0.1
252+ 2.130.706.433
253+ ~zod/try=> ~(rend co %many ~[[~ %ud 20] [~ %uw 133] [~ %tas 'sam']])
254+ "._20_0w25_sam__"
255+ ~zod/try=> ~(rend co %blob [1 1])
256+ "~0ph"
257+ ~zod/try=> ~0ph
258+ [1 1]
259+ ~zod/try=> `@uv`(jam [1 1])
260+ 0vph
261+
262+
263+
264+***
2265### `++alf`
3266
4267Alphabetic characters
@@ -554,13 +817,13 @@ Examples
554817
555818Indentation block
556819
557−Apply [`++rule`]() to indented block starting at current column number, omitting
820+Apply `++rule` to indented block starting at current column number, omitting
558821the leading whitespace.
559822
560823Accepts
561824-------
562825
563−`sef` is a [`++rule`]()
826+`sef` is a `++rule`
564827
565828Produces
566829--------
@@ -570,7 +833,7 @@ A `++rule`.
570833Source
571834------
572835
573− ++ iny |* sef=_rule :: indentation block
836+ ++ inde |* sef/rule :: indentation block
574837 |= nail ^+ (sef)
575838 =+ [har tap]=[p q]:+<
576839 =+ lev=(fil 3 (dec q.har) ' ')
@@ -646,7 +909,7 @@ Source
646909------
647910
648911 ++ mes %+ cook :: hexbyte
649− |=([a=@ b=@] (add (mul 16 a) b))
912+ |=({a/@ b/@} (add (mul 16 a) b))
650913 ;~(plug hit hit)
651914
652915Examples
@@ -910,10 +1173,10 @@ Axis syntax parser
9101173Source
9111174------
9121175
913− ++ ven ;~ (comp |=([a=@ b=@] (peg a b))) :: +>- axis syntax
1176+ ++ ven ;~ (comp |=({a/@ b/@} (peg a b))) :: +>- axis syntax
9141177 bet
9151178 =+ hom=`?`|
916− |= tub=nail
1179+ |= tub/nail
9171180 ^- (like axis)
9181181 =+ vex=?:(hom (bet tub) (gul tub))
9191182 ?~ q.vex
@@ -949,9 +1212,9 @@ Source
9491212
9501213 ++ vit :: base64 digit
9511214 ;~ pose
952− (cook |=(a=@ (sub a 65)) (shim 'A' 'Z'))
953− (cook |=(a=@ (sub a 71)) (shim 'a' 'z'))
954− (cook |=(a=@ (add a 4)) (shim '0' '9'))
1215+ (cook |=(a/@ (sub a 65)) (shim 'A' 'Z'))
1216+ (cook |=(a/@ (sub a 71)) (shim 'a' 'z'))
1217+ (cook |=(a/@ (add a 4)) (shim '0' '9'))
9551218 (cold 62 (just '-'))
9561219 (cold 63 (just '+'))
9571220 ==
@@ -977,7 +1240,7 @@ Comments to null
9771240Source
9781241------
9791242
980− ++ vul %- cold :- ~ :: comments
1243+ ++ vul %+ cold ~ :: comments
9811244 ;~ plug col col
9821245 (star prn)
9831246 (just `@`10)
@@ -997,341 +1260,4 @@ Examples
9971260
9981261
9991262
1000−***
1001−### `++co`
1002−
1003−Literal rendering engine
1004−
1005−A [door]() that contains arms that operate on the sample coin `lot`.
1006−
1007−Accepts
1008−-------
1009−
1010−Produces
1011−--------
1012−
1013−`lot` is a [`++coin`]().
1014−
1015−Source
1016−------
1017−
1018− ++ co
1019− =< |_ lot=coin
1020−
1021−Examples
1022−--------
1023−
1024− ~zod/try=> ~(. co many/~[`ta/'mo' `ud/5])
1025− < 3.dhd
1026− [ [ %many
1027− [%~ %ta @t]
1028− [%~ %ud @ud]
1029− %~
1030− ]
1031− <10.utz 3.zid [rex="" <414.hmb 100.xkc 1.ypj %164>]>
1032− ]
1033− >
1034−
1035−------------------------------------------------------------------------
1036−
1037−### `++rear`
1038−
1039−Prepend & render as tape
1040−
1041−Renders a coin `lot` as a [tape]() prepended to the sample tape `rom`.
1042−
1043−Accepts
1044−-------
1045−
1046−Produces
1047−--------
1048−
1049−`rom` is a [`pe`]()
1050−
1051−`lot` is a [`++coin`]().
1052−
1053−Source
1054−------
1055−
1056− ++ rear |=(rom=tape =>(.(rex rom) rend))
1057−
1058−Examples
1059−--------
1060−
1061− ~zod/try=> (~(rear co %$ %ux 200) "--ha")
1062− "0xc8--ha"
1063−
1064−------------------------------------------------------------------------
1065−
1066−### `++rent`
1067−
1068−Render as span
1069−
1070−Renders a coin `lot` as a span.
1071−
1072−Accepts
1073−-------
1074−
1075−Produces
1076−--------
1077−
1078−`lot` is a [`++coin`]().
1079−
1080−Source
1081−------
1082−
1083− ++ rent `@ta`(rap 3 rend)
1084−
1085−Examples
1086−--------
1087−
1088− ~zod/try=> ~(rent co %$ %ux 200)
1089− ~.0xc8
1090− ~zod/try=> `@t`~(rent co %$ %ux 200)
1091− '0xc8'
1092−
1093−------------------------------------------------------------------------
1094−
1095−### `++rend`
1096−
1097−Render as tape
1098−
1099−Renders a coin `lot` as a tape.
1100−
1101−Accepts
1102−-------
1103−
1104−Produces
1105−--------
1106−
1107−`lot` is a [`++coin`]().
1108−
1109−Source
1110−------
1111−
1112− ++ rend
1113− ^- tape
1114− ?: ?=(%blob -.lot)
1115− ['~' '0' ((v-co 1) (jam p.lot))]
1116− ?: ?=(%many -.lot)
1117− :- '.'
1118− |- ^- tape
1119− ?~ p.lot
1120− ['_' '_' rex]
1121− ['_' (weld (trip (wack rent(lot i.p.lot))) $(p.lot t.p.lot))]
1122− =+ [yed=(end 3 1 p.p.lot) hay=(cut 3 [1 1] p.p.lot)]
1123− |- ^- tape
1124− ?+ yed (z-co q.p.lot)
1125− %c ['~' '-' (weld (rip 3 (wood (tuft q.p.lot))) rex)]
1126− %d
1127− ?+ hay (z-co q.p.lot)
1128− %a
1129− =+ yod=(yore q.p.lot)
1130− => ^+(. .(rex ?~(f.t.yod rex ['.' (s-co f.t.yod)])))
1131− => ^+ .
1132− %= .
1133− rex
1134− ?: &(=(~ f.t.yod) =(0 h.t.yod) =(0 m.t.yod) =(0 s.t.yod))
1135− rex
1136− => .(rex ['.' (y-co s.t.yod)])
1137− => .(rex ['.' (y-co m.t.yod)])
1138− ['.' '.' (y-co h.t.yod)]
1139− ==
1140− => .(rex ['.' (a-co d.t.yod)])
1141− => .(rex ['.' (a-co m.yod)])
1142− => .(rex ?:(a.yod rex ['-' rex]))
1143− ['~' (a-co y.yod)]
1144− ::
1145− %r
1146− =+ yug=(yell q.p.lot)
1147− => ^+(. .(rex ?~(f.yug rex ['.' (s-co f.yug)])))
1148− :- '~'
1149− ?: &(=(0 d.yug) =(0 m.yug) =(0 h.yug) =(0 s.yug))
1150− ['.' 's' '0' rex]
1151− => ^+(. ?:(=(0 s.yug) . .(rex ['.' 's' (a-co s.yug)])))
1152− => ^+(. ?:(=(0 m.yug) . .(rex ['.' 'm' (a-co m.yug)])))
1153− => ^+(. ?:(=(0 h.yug) . .(rex ['.' 'h' (a-co h.yug)])))
1154− => ^+(. ?:(=(0 d.yug) . .(rex ['.' 'd' (a-co d.yug)])))
1155− +.rex
1156− ==
1157− ::
1158− %f
1159− ?: =(& q.p.lot)
1160− ['.' 'y' rex]
1161− ?:(=(| q.p.lot) ['.' 'n' rex] (z-co q.p.lot))
1162− ::
1163− %n ['~' rex]
1164− %i
1165− ?+ hay (z-co q.p.lot)
1166− %f ((ro-co [3 10 4] |=(a=@ ~(d ne a))) q.p.lot)
1167− %s ((ro-co [4 16 8] |=(a=@ ~(x ne a))) q.p.lot)
1168− ==
1169− ::
1170− %p
1171− =+ dyx=(met 3 q.p.lot)
1172− :- '~'
1173− ?: (lte dyx 1)
1174− (weld (trip (tod:po q.p.lot)) rex)
1175− ?: =(2 dyx)
1176− ;: weld
1177− (trip (tos:po (end 3 1 q.p.lot)))
1178− (trip (tod:po (rsh 3 1 q.p.lot)))
1179− rex
1180− ==
1181− =+ [dyz=(met 5 q.p.lot) fin=|]
1182− |- ^- tape
1183− ?: =(0 dyz)
1184− rex
1185− %= $
1186− fin &
1187− dyz (dec dyz)
1188− q.p.lot (rsh 5 1 q.p.lot)
1189− rex
1190− =+ syb=(wren:un (end 5 1 q.p.lot))
1191− =+ cog=~(zig mu [(rsh 4 1 syb) (end 4 1 syb)])
1192− ;: weld
1193− (trip (tos:po (end 3 1 p.cog)))
1194− (trip (tod:po (rsh 3 1 p.cog)))
1195− `tape`['-' ~]
1196− (trip (tos:po (end 3 1 q.cog)))
1197− (trip (tod:po (rsh 3 1 q.cog)))
1198− `tape`?:(fin ['-' ?:(=(1 (end 0 1 dyz)) ~ ['-' ~])] ~)
1199− rex
1200− ==
1201− ==
1202− ::
1203− %r
1204− ?+ hay (z-co q.p.lot)
1205− %d
1206− =+ r=(rlyd q.p.lot)
1207− ?~ e.r
1208− ['.' '~' (r-co r)]
1209− ['.' '~' u.e.r]
1210− %h ['.' '~' '~' (r-co (rlyh q.p.lot))]
1211− %q ['.' '~' '~' '~' (r-co (rlyq q.p.lot))]
1212− %s ['.' (r-co (rlys q.p.lot))]
1213− ==
1214− ::
1215− %u
1216− =- (weld p.gam ?:(=(0 q.p.lot) `tape`['0' ~] q.gam))
1217− ^= gam ^- [p=tape q=tape]
1218− ?+ hay [~ ((ox-co [10 3] |=(a=@ ~(d ne a))) q.p.lot)]
1219− %b [['0' 'b' ~] ((ox-co [2 4] |=(a=@ ~(d ne a))) q.p.lot)]
1220− %i [['0' 'i' ~] ((d-co 1) q.p.lot)]
1221− %x [['0' 'x' ~] ((ox-co [16 4] |=(a=@ ~(x ne a))) q.p.lot)]
1222− %v [['0' 'v' ~] ((ox-co [32 5] |=(a=@ ~(x ne a))) q.p.lot)]
1223− %w [['0' 'w' ~] ((ox-co [64 5] |=(a=@ ~(w ne a))) q.p.lot)]
1224− ==
1225− ::
1226− %s
1227− %+ weld
1228− ?:((syn:si q.p.lot) "--" "-")
1229− $(yed 'u', q.p.lot (abs:si q.p.lot))
1230− ::
1231− %t
1232− ?: =('a' hay)
1233− ?: =('s' (cut 3 [2 1] p.p.lot))
1234−
1235− (weld (rip 3 q.p.lot) rex)
1236− ['~' '.' (weld (rip 3 q.p.lot) rex)]
1237− ['~' '~' (weld (rip 3 (wood q.p.lot)) rex)]
1238− ==
1239− --
1240− =+ rex=*tape
1241− =< |%
1242− ++ a-co |=(dat=@ ((d-co 1) dat))
1243− ++ d-co |=(min=@ (em-co [10 min] |=([? b=@ c=tape] [~(d ne b) c])))
1244− ++ r-co
1245− |= [syn=? nub=@ der=@ ign=(unit tape) ne=?]
1246− => .(rex ['.' (t-co ((d-co 1) der) ne)])
1247− => .(rex ((d-co 1) nub))
1248− ?:(syn rex ['-' rex])
1249− ++ t-co |= [a=tape n=?] ^- tape
1250− ?: n a
1251− ?~ a ~|(%empty-frac !!) t.a
1252− ::
1253− ++ s-co
1254− |= esc=(list ,@) ^- tape
1255− ~| [%so-co esc]
1256− ?~ esc
1257− rex
1258− :- '.'
1259− =>(.(rex $(esc t.esc)) ((x-co 4) i.esc))
1260−
1261− ::
1262− ++ v-co |=(min=@ (em-co [32 min] |=([? b=@ c=tape] [~(v ne b) c])))
1263− ++ w-co |=(min=@ (em-co [64 min] |=([? b=@ c=tape] [~(w ne b) c])))
1264− ++ x-co |=(min=@ (em-co [16 min] |=([? b=@ c=tape] [~(x ne b) c])))
1265− ++ y-co |=(dat=@ ((d-co 2) dat))
1266− ++ z-co |=(dat=@ `tape`['0' 'x' ((x-co 1) dat)])
1267− --
1268− ~% %co +> ~
1269− |%
1270− ++ em-co
1271− ~/ %emco
1272− |= [[bas=@ min=@] [par=$+([? @ tape] tape)]]
1273− |= hol=@
1274− ^- tape
1275− ?: &(=(0 hol) =(0 min))
1276− rex
1277− =+ [rad=(mod hol bas) dar=(div hol bas)]
1278− %= $
1279− min ?:(=(0 min) 0 (dec min))
1280− hol dar
1281− rex (par =(0 dar) rad rex)
1282− ==
1283− ::
1284− ++ ox-co
1285− ~/ %oxco
1286− |= [[bas=@ gop=@] dug=$+(@ @)]
1287− %+ em-co
1288− [|-(?:(=(0 gop) 1 (mul bas $(gop (dec gop))))) 0]
1289− |= [top=? seg=@ res=tape]
1290− %+ weld
1291− ?:(top ~ `tape`['.' ~])
1292− %. seg
1293− %+ em-co(rex res)
1294− [bas ?:(top 0 gop)]
1295− |=([? b=@ c=tape] [(dug b) c])
1296− ::
1297− ++ ro-co
1298− ~/ %roco
1299− |= [[buz=@ bas=@ dop=@] dug=$+(@ @)]
1300− |= hol=@
1301− ^- tape
1302− ?: =(0 dop)
1303− rex
1304− => .(rex $(dop (dec dop)))
1305− :- '.'
1306− %- (em-co [bas 1] |=([? b=@ c=tape] [(dug b) c]))
1307− [(cut buz [(dec dop) 1] hol)]
1308− --
1309− ::
1310−
1311−Examples
1312−--------
1313−
1314− ~zod/try=> ~(rend co ~ %ux 200)
1315− "0xc8"
1316− ~zod/try=> ~(rend co %many ~[[%$ ux/200] [%$ p/40]])
1317− "._0xc8_~~tem__"
1318− ~zod/try=> ~(rend co ~ %p 32.819)
1319− "~pillyt"
1320− ~zod/try=> ~(rend co ~ %ux 18)
1321− "0x12"
1322− ~zod/try=> ~(rend co [~ p=[p=%if q=0x7f00.0001]])
1323− ".127.0.0.1"
1324− ~zod/try=> `@ux`.127.0.0.1
1325− 2.130.706.433
1326− ~zod/try=> ~(rend co %many ~[[~ %ud 20] [~ %uw 133] [~ %tas 'sam']])
1327− "._20_0w25_sam__"
1328− ~zod/try=> ~(rend co %blob [1 1])
1329− "~0ph"
1330− ~zod/try=> ~0ph
1331− [1 1]
1332− ~zod/try=> `@uv`(jam [1 1])
1333− 0vph
1334−
1335−
1336−
13371263***
docs/system/hoon/library/4l.md+195−76
@@ -3,7 +3,7 @@
33
44Coin parser engine
55
6−Core containing arms that parse [`++coin`]s.
6+Core containing arms that parse `++coin`.
77
88Accepts
99-------
@@ -30,7 +30,7 @@ Examples
3030Parse odor-atom pair
3131
3232Parsing rule. Parses an unsigned integer of any permitted base,
33−producing a [`++dime`]().
33+producing a `++dime`.
3434
3535Accepts
3636-------
@@ -70,8 +70,8 @@ Examples
7070Parse `@da`, `@dr`, `@p`, `@t`
7171
7272Parsing rule. Parses any atom of any of the following odors after a
73−leading sig, `~` into a [`++dime`](): [`@da`](), [`@dr`](), [`@p`](),
74−and [`@t`](), producing a [`++dime`]().
73+leading sig, `~` into a `++dime`: `@da`, `@dr`, `@p`,
74+and `@t`, producing a `++dime`.
7575
7676Accepts
7777-------
@@ -83,12 +83,13 @@ Source
8383------
8484
8585 ++ crub
86+ ~+
8687 ;~ pose
8788 %+ cook
88− |=(det=date `dime`[%da (year det)])
89+ |=(det/date `dime`[%da (year det)])
8990 ;~ plug
9091 %+ cook
91− |=([a=@ b=?] [b a])
92+ |=({a/@ b/?} [b a])
9293 ;~(plug dim:ag ;~(pose (cold | hep) (easy &)))
9394 ;~(pfix dot dim:ag) :: month
9495 ;~(pfix dot dim:ag) :: day
@@ -107,16 +108,16 @@ Source
107108 ==
108109 ::
109110 %+ cook
110− |= [a=(list ,[p=?(%d %h %m %s) q=@]) b=(list ,@)]
111+ |= {a/(list {p/?($d $h $m $s) q/@}) b/(list @)}
111112 =+ rop=`tarp`[0 0 0 0 b]
112113 |- ^- dime
113114 ?~ a
114115 [%dr (yule rop)]
115116 ?- p.i.a
116− %d $(a t.a, d.rop (add q.i.a d.rop))
117− %h $(a t.a, h.rop (add q.i.a h.rop))
118− %m $(a t.a, m.rop (add q.i.a m.rop))
119− %s $(a t.a, s.rop (add q.i.a s.rop))
117+ $d $(a t.a, d.rop (add q.i.a d.rop))
118+ $h $(a t.a, h.rop (add q.i.a h.rop))
119+ $m $(a t.a, m.rop (add q.i.a m.rop))
120+ $s $(a t.a, s.rop (add q.i.a s.rop))
120121 ==
121122 ;~ plug
122123 %+ most
@@ -132,20 +133,122 @@ Source
132133 ::
133134 (stag %p fed:ag)
134135 ;~(pfix dot (stag %ta urs:ab))
135− ;~(pfix sig (stag %t (cook woad urs:ab)))
136− ;~(pfix hep (stag %c (cook turf (cook woad urs:ab))))
136+ ;~(pfix sig (stag %t urx:ab))
137+ ;~(pfix hep (stag %c (cook turf urx:ab)))
137138 ==
139+ ++ nuck
140+ ~/ %nuck |= a/nail %. a
141+ %+ knee *coin |. ~+
142+ %- stew
143+ ^. stet ^. limo
144+ :~ :- ['a' 'z'] (cook |=(a/@ta [%$ %tas a]) sym)
145+ :- ['0' '9'] (stag %$ bisk)
146+ :- '-' (stag %$ tash)
147+ :- '.' ;~(pfix dot perd)
148+ :- '~' ;~(pfix sig ;~(pose twid (easy [%$ %n 0])))
149+ ==
150+ ++ nusk
151+ ~+
152+ :(sear |=(a/@ta (rush a nuck)) wick urt:ab)
153+ ++ perd
154+ ~+
155+ ;~ pose
156+ (stag %$ zust)
157+ (stag %many (ifix [cab ;~(plug cab cab)] (more cab nusk)))
158+ ==
159+ ++ royl
160+ ~+
161+ =+ ^= moo
162+ |= a/tape
163+ :- (lent a)
164+ (scan a (bass 10 (plus sid:ab)))
165+ =+ ^= voy
166+ %+ cook royl-cell
167+ ;~ pose
168+ ;~ plug
169+ (easy %d)
170+ ;~ pose (cold | hep) (easy &) ==
171+ ;~ plug dim:ag
172+ ;~ pose
173+ ;~(pfix dot (cook moo (plus (shim '0' '9'))))
174+ (easy [0 0])
175+ ==
176+ ;~ pose
177+ ;~ pfix
178+ (just 'e')
179+ ;~(plug ;~(pose (cold | hep) (easy &)) dim:ag)
180+ ==
181+ (easy [& 0])
182+ ==
183+ ==
184+ ==
185+ ;~ plug
186+ (easy %i)
187+ ;~ sfix
188+ ;~ pose (cold | hep) (easy &) ==
189+ (jest 'inf')
190+ ==
191+ ==
192+ ;~ plug
193+ (easy %n)
194+ (cold ~ (jest 'nan'))
195+ ==
196+ ==
197+ ;~ pose
198+ (stag %rh (cook rylh ;~(pfix ;~(plug sig sig) voy)))
199+ (stag %rq (cook rylq ;~(pfix ;~(plug sig sig sig) voy)))
200+ (stag %rd (cook ryld ;~(pfix sig voy)))
201+ (stag %rs (cook ryls voy))
202+ ==
203+ ::
204+ ++ royl-cell
205+ |= rn
206+ ^- dn
207+ ?. ?=({$d *} +<) +<
208+ =+ ^= h
209+ (dif:si (new:si f.b i.b) (sun:si d.b))
210+ [%d a h (add (mul c.b (pow 10 d.b)) e.b)]
211+ ::
212+ ++ tash
213+ ~+
214+ =+ ^= neg
215+ |= {syn/? mol/dime} ^- dime
216+ ?> =('u' (end 3 1 p.mol))
217+ [(cat 3 's' (rsh 3 1 p.mol)) (new:si syn q.mol)]
218+ ;~ pfix hep
219+ ;~ pose
220+ (cook |=(a/dime (neg | a)) bisk)
221+ ;~(pfix hep (cook |=(a/dime (neg & a)) bisk))
222+ ==
223+ ==
224+ ::
225+ ++ twid
226+ ~+
227+ ;~ pose
228+ (cook |=(a/@ [%blob (cue a)]) ;~(pfix (just '0') vum:ag))
229+ (stag %$ crub)
230+ ==
231+ ::
232+ ++ zust
233+ ~+
234+ ;~ pose
235+ (stag %is bip:ag)
236+ (stag %if lip:ag)
237+ (stag %f ;~(pose (cold & (just 'y')) (cold | (just 'n'))))
238+ royl
239+ ==
240+ --
138241
139242Examples
140243--------
141244
142245 ~zod/try=> (scan "1926.5.12" crub:so)
143246 [p=~.da q=170.141.184.449.747.016.871.285.095.307.149.312.000]
144− ~zod/try=> (,[%da @da] (scan "1926.5.12" crub:so))
247+ ~zod/try=> ([%da @da] (scan "1926.5.12" crub:so))
145248 [%da ~1926.5.12]
146249 ~zod/try=> (scan "s10" crub:so)
147250 [p=~.dr q=184.467.440.737.095.516.160]
148− ~zod/try=> (,[%dr @dr] (scan "s10" crub:so))
251+ ~zod/try=> ([%dr @dr] (scan "s10" crub:so))
149252 [%dr ~s10]
150253 ~zod/try=> (scan "doznec" crub:so)
151254 [%p 256]
@@ -159,7 +262,7 @@ Examples
159262Top-level coin parser
160263
161264Parsing rule. Switches on the first character and applies the
162−corresponding [`++coin`]() parser.
265+corresponding `++coin` parser.
163266
164267Accepts
165268-------
@@ -170,16 +273,19 @@ Produces
170273Source
171274------
172275
173− ++ nuck
174− %+ knee *coin |. ~+
175− %- stew
176− ^. stet ^. limo
177− :~ :- ['a' 'z'] (cook |=(a=@ta [~ %tas a]) sym)
178− :- ['0' '9'] (stag ~ bisk)
179− :- '-' (stag ~ tash)
180− :- '.' ;~(pfix dot perd)
181− :- '~' ;~(pfix sig ;~(pose twid (easy [~ %n 0])))
182− ==
276+ ++ nuck
277+ ~/ %nuck |= a/nail %. a
278+ %+ knee *coin |. ~+
279+ %- stew
280+ ^. stet ^. limo
281+ :~ :- ['a' 'z'] (cook |=(a/@ta [%$ %tas a]) sym)
282+ :- ['0' '9'] (stag %$ bisk)
283+ :- '-' (stag %$ tash)
284+ :- '.' ;~(pfix dot perd)
285+ :- '~' ;~(pfix sig ;~(pose twid (easy [%$ %n 0])))
286+ ==
287+
288+
183289
184290Examples
185291--------
@@ -225,7 +331,7 @@ Source
225331------
226332
227333 ++ nusk
228− (sear |=(a=@ta (rush (wick a) nuck)) urt:ab)
334+ (sear |=(a/@ta (rush (wick a) nuck)) urt:ab)
229335
230336Examples
231337--------
@@ -236,7 +342,7 @@ Examples
236342 [1 ~.asd_a]
237343 ~zod/try=> (scan "~~.asd~-a" nusk:so)
238344 [% p=[p=~.ta q=418.212.246.369]]
239− ~zod/try=> (,[~ %ta @ta] (scan "~~.asd~-a" nusk:so))
345+ ~zod/try=> ([~ %ta @ta] (scan "~~.asd~-a" nusk:so))
240346 [~ %ta ~.asd_a]
241347
242348------------------------------------------------------------------------
@@ -281,7 +387,7 @@ Examples
281387
282388Parse dime float
283389
284−Parsing rule. Parses a number into a [`++dime`]() float.
390+Parsing rule. Parses a number into a `++dime` float.
285391
286392Accepts
287393-------
@@ -292,28 +398,51 @@ Produces
292398Source
293399------
294400
295− ++ royl
296− =+ ^= zer
297− (cook lent (star (just '0')))
298− =+ ^= voy
299− %+ cook royl-cell
300− ;~ plug
301− ;~(pose (cold | hep) (easy &))
302− ;~(plug dim:ag ;~(pose ;~(pfix dot ;~(plug zer dim:ag)) (easy [0 0])))
303− ;~ pose
304− ;~ pfix
305− (just 'e')
306− (cook some ;~(plug ;~(pose (cold | hep) (easy &)) dim:ag))
307− ==
308− (easy ~)
401+ ++ royl
402+ ~+
403+ =+ ^= moo
404+ |= a/tape
405+ :- (lent a)
406+ (scan a (bass 10 (plus sid:ab)))
407+ =+ ^= voy
408+ %+ cook royl-cell
409+ ;~ pose
410+ ;~ plug
411+ (easy %d)
412+ ;~ pose (cold | hep) (easy &) ==
413+ ;~ plug dim:ag
414+ ;~ pose
415+ ;~(pfix dot (cook moo (plus (shim '0' '9'))))
416+ (easy [0 0])
417+ ==
418+ ;~ pose
419+ ;~ pfix
420+ (just 'e')
421+ ;~(plug ;~(pose (cold | hep) (easy &)) dim:ag)
309422 ==
423+ (easy [& 0])
310424 ==
311− ;~ pose
312− (stag %rh (cook rylh ;~(pfix ;~(plug sig sig) voy)))
313− (stag %rq (cook rylq ;~(pfix ;~(plug sig sig sig) voy)))
314− (stag %rd (cook ryld ;~(pfix sig voy)))
315− (stag %rs (cook ryls voy)
425+ ==
426+ ==
427+ ;~ plug
428+ (easy %i)
429+ ;~ sfix
430+ ;~ pose (cold | hep) (easy &) ==
431+ (jest 'inf')
432+ ==
433+ ==
434+ ;~ plug
435+ (easy %n)
436+ (cold ~ (jest 'nan'))
316437 ==
438+ ==
439+ ;~ pose
440+ (stag %rh (cook rylh ;~(pfix ;~(plug sig sig) voy)))
441+ (stag %rq (cook rylq ;~(pfix ;~(plug sig sig sig) voy)))
442+ (stag %rd (cook ryld ;~(pfix sig voy)))
443+ (stag %rs (cook ryls voy))
444+ ==
445+ ::
317446
318447Examples
319448--------
@@ -331,6 +460,15 @@ XX still not fully functional
331460
332461Intermediate parsed float convereter
333462
463+ ++ royl-cell
464+ |= rn
465+ ^- dn
466+ ?. ?=({$d *} +<) +<
467+ =+ ^= h
468+ (dif:si (new:si f.b i.b) (sun:si d.b))
469+ [%d a h (add (mul c.b (pow 10 d.b)) e.b)]
470+ ::
471+
334472------------------------------------------------------------------------
335473
336474### `++tash`
@@ -340,46 +478,27 @@ Parse signed dime
340478Accepts
341479-------
342480
343−Accepts
344−-------
345−
346481Produces
347482--------
348483
349−Produces
350−--------
351−
352−Parsing rule. Parses a signed number into a [`++dime`]().
353−
354−Source
355−------
356−
357− ++ royl-cell
358− |= [a=? b=[c=@ d=@ e=@] f=(unit ,[h=? i=@])]
359− ^- [? @ @ @ (unit ,@s)]
360− ?~ f
361− [a c.b d.b e.b ~]
362− ?: h.u.f
363− [a c.b d.b e.b [~ (mul i.u.f 2)]]
364− [a c.b d.b e.b [~ (dec (mul i.u.f 2))]]
365−
366−Examples
367−--------
484+Parsing rule. Parses a signed number into a `++dime`.
368485
369486Source
370487------
371488
372489 ++ tash
490+ ~+
373491 =+ ^= neg
374− |= [syn=? mol=dime] ^- dime
492+ |= {syn/? mol/dime} ^- dime
375493 ?> =('u' (end 3 1 p.mol))
376494 [(cat 3 's' (rsh 3 1 p.mol)) (new:si syn q.mol)]
377495 ;~ pfix hep
378496 ;~ pose
379− (cook |=(a=dime (neg | a)) bisk)
380− ;~(pfix hep (cook |=(a=dime (neg & a)) bisk))
497+ (cook |=(a/dime (neg | a)) bisk)
498+ ;~(pfix hep (cook |=(a/dime (neg & a)) bisk))
381499 ==
382500 ==
501+ ::
383502
384503Examples
385504--------
@@ -412,7 +531,7 @@ Source
412531
413532 ++ twid
414533 ;~ pose
415− (cook |=(a=@ [%blob (cue a)]) ;~(pfix (just '0') vum:ag))
534+ (cook |=(a/@ [%blob (cue a)]) ;~(pfix (just '0') vum:ag))
416535 (stag ~ crub)
417536 ==
418537 ::
@@ -437,8 +556,8 @@ Examples
437556
438557Parse prefixed dimes from `@if`, `@f`, `@rd`
439558
440−Parsing rule. Parses an atom of either [`@if`]() (IP address), [`@f`]()
441−(loobean), or [`rf`]()(floating point) into a [`++dime`]().
559+Parsing rule. Parses an atom of either `@if` (IP address), `@f`
560+(loobean), or `rf`(floating point) into a `++dime`.
442561
443562Accepts
444563-------
docs/system/hoon/library/4m.md+60−54
@@ -11,12 +11,12 @@ Accepts
1111Produces
1212--------
1313
14−`mol` is a [`++dime`]().
14+`mol` is a `++dime`.
1515
1616Source
1717------
1818
19− ++ scot |=(mol=dime ~(rent co %$ mol))
19+ ++ scot |=(mol/dime ~(rent co %$ mol))
2020
2121Examples
2222--------
@@ -53,12 +53,12 @@ Accepts
5353Produces
5454--------
5555
56−`mol` is a [`++dime`]().
56+`mol` is a `++dime`.
5757
5858Source
5959------
6060
61− ++ scow |=(mol=dime ~(rend co %$ mol))
61+ ++ scow |=(mol/dime ~(rend co %$ mol))
6262
6363Examples
6464--------
@@ -79,7 +79,7 @@ Examples
7979
8080Curried slaw
8181
82−Produces a [`gate`]() that parses a [`term`]() `txt` to an atom of the
82+Produces a `gate` that parses a `term` `txt` to an atom of the
8383odor specified by `mod`.
8484
8585Accepts
@@ -88,25 +88,25 @@ Accepts
8888Produces
8989--------
9090
91−`mod` is a term, an atom of odor [`@tas`]().
91+`mod` is a term, an atom of odor `@tas`.
9292
93−`txt` is a span, an atom of odor [`@ta`]().
93+`txt` is a span, an atom of odor `@ta`.
9494
9595Source
9696------
9797
98− ++ slat |=(mod=@tas |=(txt=@ta (slaw mod txt)))
98+ ++ slat |=(mod/@tas |=(txt/@ta (slaw mod txt)))
9999
100100Examples
101101--------
102102
103− ~zod/try=> `(unit ,@p)`((slat %p) '~pillyt')
103+ ~zod/try=> `(unit @p)`((slat %p) '~pillyt')
104104 [~ ~pillyt]
105− ~zod/try=> `(unit ,@ux)`((slat %ux) '0x12')
105+ ~zod/try=> `(unit @ux)`((slat %ux) '0x12')
106106 [~ 0x12]
107− ~zod/try=> `(unit ,@if)`((slat %if) '.127.0.0.1')
107+ ~zod/try=> `(unit @if)`((slat %if) '.127.0.0.1')
108108 [~ .127.0.0.1]
109− ~zod/try=> `(unit ,@ta)`((slat %ta) '~.asd_a')
109+ ~zod/try=> `(unit @ta)`((slat %ta) '~.asd_a')
110110 [~ ~.asd_a
111111
112112
@@ -125,14 +125,14 @@ Accepts
125125Produces
126126--------
127127
128−`mod` is a term, an atom of odor [`@tas`]().
128+`mod` is a term, an atom of odor `@tas`.
129129
130−`txt` is a span, an atom of odor [`@ta`]().
130+`txt` is a span, an atom of odor `@ta`.
131131
132132Source
133133------
134134
135− ++ slav |=([mod=@tas txt=@ta] (need (slaw mod txt)))
135+ ++ slav |=([mod/@tas txt/@ta] (need (slaw mod txt)))
136136
137137Examples
138138--------
@@ -169,38 +169,39 @@ Accepts
169169Produces
170170--------
171171
172−`mod` is a term, an atom of odor [`@tas`]().
172+`mod` is a term, an atom of odor `@tas`.
173173
174−`txt` is a span, an atom of odor [`@ta`]().
174+`txt` is a span, an atom of odor `@ta`.
175175
176176Source
177177------
178178
179179 ++ slaw
180− |= [mod=@tas txt=@ta]
181− ^- (unit ,@)
180+ ~/ %slaw
181+ |= {mod/@tas txt/@ta}
182+ ^- (unit @)
182183 =+ con=(slay txt)
183− ?.(&(?=([~ %$ @ @] con) =(p.p.u.con mod)) ~ [~ q.p.u.con])
184− ::
184+ ?.(&(?=({$~ $$ @ @} con) =(p.p.u.con mod)) ~ [~ q.p.u.con])
185+
185186
186187Examples
187188--------
188189
189− ~zod/try=> `(unit ,@p)`(slaw %p '~pillyt')
190+ ~zod/try=> `(unit @p)`(slaw %p '~pillyt')
190191 [~ ~pillyt]
191− ~zod/try=> `(unit ,@p)`(slaw %p '~pillam')
192+ ~zod/try=> `(unit @p)`(slaw %p '~pillam')
192193 ~
193− ~zod/try=> `(unit ,@ux)`(slaw %ux '0x12')
194+ ~zod/try=> `(unit @ux)`(slaw %ux '0x12')
194195 [~ 0x12]
195− ~zod/try=> `(unit ,@ux)`(slaw %ux '0b10')
196+ ~zod/try=> `(unit @ux)`(slaw %ux '0b10')
196197 ~
197− ~zod/try=> `(unit ,@if)`(slaw %if '.127.0.0.1')
198+ ~zod/try=> `(unit @if)`(slaw %if '.127.0.0.1')
198199 [~ .127.0.0.1]
199− ~zod/try=> `(unit ,@if)`(slaw %if '.fe80.0.0.202')
200+ ~zod/try=> `(unit @if)`(slaw %if '.fe80.0.0.202')
200201 ~
201− ~zod/try=> `(unit ,@ta)`(slaw %ta '~.asd_a')
202+ ~zod/try=> `(unit @ta)`(slaw %ta '~.asd_a')
202203 [~ ~.asd_a]
203− ~zod/try=> `(unit ,@ta)`(slaw %ta '~~asd-a')
204+ ~zod/try=> `(unit @ta)`(slaw %ta '~~asd-a')
204205 ~
205206
206207
@@ -210,7 +211,7 @@ Examples
210211
211212Parse span to coin
212213
213−Parses a span `txt` to the unit of a [`++coin`]().
214+Parses a span `txt` to the unit of a `++coin`.
214215
215216Accepts
216217-------
@@ -218,18 +219,22 @@ Accepts
218219Produces
219220--------
220221
221−`txt` is a [`@ta`]().
222+`txt` is a `@ta`.
222223
223224Source
224225------
225226
226− ++ slay
227− |= txt=@ta ^- (unit coin)
228− =+ vex=((full nuck:so) [[1 1] (trip txt)])
229− ?~ q.vex
230− ~
231− [~ p.u.q.vex]
232− ::
227+ ++ slay
228+ |= txt/@ta ^- (unit coin)
229+ =+ ^= vex
230+ ?: (gth 0x7fff.ffff txt) :: XX petty cache
231+ ~+ ((full nuck:so) [[1 1] (trip txt)])
232+ ((full nuck:so) [[1 1] (trip txt)])
233+ ?~ q.vex
234+ ~
235+ [~ p.u.q.vex]
236+ ::
237+
233238
234239Examples
235240--------
@@ -266,7 +271,7 @@ Examples
266271
267272Render path as tank
268273
269−Renders the path `bon` as a [`tank`](), which is used for
274+Renders the path `bon` as a `tank`, which is used for
270275pretty-printing.
271276
272277Accepts
@@ -275,16 +280,16 @@ Accepts
275280Produces
276281--------
277282
278−`bon` is a [`++path`]().
283+`bon` is a `++path`.
279284
280285Source
281286------
282287
283− ++ smyt
284− |= bon=path ^- tank
285− :+ %rose [['/' ~] ['/' ~] ['/' ~]]
286− |- ^- (list tank)
287− (turn bon |=(a=@ [%leaf (rip 3 a)]))
288+ ++ smyt :: pretty print path
289+ |= bon/path ^- tank
290+ :+ %rose [['/' ~] ['/' ~] ~]
291+ (turn bon |=(a/@ [%leaf (trip a)]))
292+ ::
288293
289294Examples
290295--------
@@ -319,12 +324,12 @@ Accepts
319324Produces
320325--------
321326
322−`pax` is a [`path`]().
327+`pax` is a `path`.
323328
324329Source
325330------
326331
327− ++ spat |=(pax=path (crip (spud pax))) :: path to cord
332+ ++ spat |=(pax/path (crip (spud pax))) :: path to cord
328333
329334Examples
330335--------
@@ -343,7 +348,7 @@ Examples
343348
344349Render path as tape
345350
346−Renders a path `pax` as [tape]().
351+Renders a path `pax` as tape.
347352
348353Accepts
349354-------
@@ -351,12 +356,12 @@ Accepts
351356Produces
352357--------
353358
354−`pax` is a [`path`]().
359+`pax` is a `path`.
355360
356361Source
357362------
358363
359− ++ spud |=(pax=path ~(ram re (smyt pax))) :: path to tape
364+ ++ spud |=(pax/path ~(ram re (smyt pax))) :: path to tape
360365
361366Examples
362367--------
@@ -375,7 +380,7 @@ Examples
375380
376381Parse span to path
377382
378−Parsing rule. Parses a span `zep` to a static [`++path`](/doc/hoon/library/1#++path).
383+Parsing rule. Parses a span `zep` to a static `++path`.
379384
380385Accepts
381386-------
@@ -386,9 +391,10 @@ Produces
386391Source
387392------
388393
389− ++ stab :: parse span to path
390− |= zep=@ta ^- path
391− (rash zep ;~(pfix fas ;~(sfix (more fas urs:ab) fas)))
394+ ++ stab :: parse cord to path
395+ =+ fel=;~(pfix fas (more fas urs:ab))
396+ |=(zep/@t `path`(rash zep fel))
397+
392398
393399Examples
394400--------
docs/system/hoon/library/4n.md+109−126
@@ -3,14 +3,14 @@
33
44Nock subject to unit
55
6−Accepts a nock subject-formula cell and wraps it into a [`++unit`]().
6+Accepts a nock subject-formula cell and wraps it into a `++unit`.
77`fol` is pure nock, meaning that nock `11` operations result in a block,
88producing a `~`.
99
1010Accepts
1111-------
1212
13−`sub` is a subject [noun]().
13+`sub` is a subject noun.
1414
1515`fol` is a formula noun, which is generally a `++nock`.
1616
@@ -23,12 +23,13 @@ Source
2323------
2424
2525 ++ mack
26− |= [sub=* fol=*]
26+ |= {sub/* fol/*}
2727 ^- (unit)
28− =+ ton=(mink [sub fol] |=(* ~))
29− ?.(?=([0 *] ton) ~ [~ p.ton])
28+ =+ ton=(mink [sub fol] |=({* *} ~))
29+ ?.(?=({$0 *} ton) ~ [~ p.ton])
3030 ::
3131
32+
3233Examples
3334--------
3435
@@ -40,7 +41,7 @@ Examples
4041 ~
4142 ~zod/try=> (mack [[[0 2] [1 3]] 4 4 4 4 0 5])
4243 [~ 6]
43− ~zod/try=> ;;((unit ,@tas) (mack [[1 %yes %no] 6 [0 2] [0 6] 0 7]))
44+ ~zod/try=> ;;((unit @tas) (mack [[1 %yes %no] 6 [0 2] [0 6] 0 7]))
4445 [~ %no]
4546
4647
@@ -50,19 +51,19 @@ Examples
5051
5152Mock interpreter
5253
53−Bottom-level [mock]() (virtual nock) interpreter. Produces a
54−[`++tone`](), a nock computation result. If nock 11 is invoked, `sky`
55−computes on the subject and produces a [`++unit`]() result. An empty
54+Bottom-level mock (virtual nock) interpreter. Produces a
55+`++tone`, a nock computation result. If nock 11 is invoked, `sky`
56+computes on the subject and produces a `++unit` result. An empty
5657result becomes a `%1` `++tone`, indicating a block.
5758
5859Accepts
5960-------
6061
61−`sub` is the subject as a [noun]().
62+`sub` is the subject as a noun.
6263
6364`fol` is the formula as a noun.
6465
65−`sky` is an [`%iron`]() gate invoked with [nock operator 11]().
66+`sky` is an `%iron` gate invoked with nock operator 11.
6667
6768Produces
6869--------
@@ -74,98 +75,100 @@ Source
7475
7576 ++ mink
7677 ~/ %mink
77− |= [[sub=* fol=*] sky=$+(* (unit))]
78− =+ tax=*(list ,[@ta *])
78+ |= {{sub/* fol/*} gul/$-({* *} (unit (unit)))}
79+ =+ tax=*(list {@ta *})
7980 |- ^- tone
8081 ?@ fol
8182 [%2 tax]
8283 ?: ?=(^ -.fol)
8384 =+ hed=$(fol -.fol)
84− ?: ?=(%2 -.hed)
85+ ?: ?=($2 -.hed)
8586 hed
8687 =+ tal=$(fol +.fol)
8788 ?- -.tal
88− %0 ?-(-.hed %0 [%0 p.hed p.tal], %1 hed)
89− %1 ?-(-.hed %0 tal, %1 [%1 (weld p.hed p.tal)])
90− %2 tal
89+ $0 ?-(-.hed $0 [%0 p.hed p.tal], $1 hed)
90+ $1 ?-(-.hed $0 tal, $1 [%1 (weld p.hed p.tal)])
91+ $2 tal
9192 ==
9293 ?+ fol
9394 [%2 tax]
9495 ::
95− [0 b=@]
96+ {$0 b/@}
9697 ?: =(0 b.fol) [%2 tax]
9798 ?: =(1 b.fol) [%0 sub]
9899 ?: ?=(@ sub) [%2 tax]
99100 =+ [now=(cap b.fol) lat=(mas b.fol)]
100101 $(b.fol lat, sub ?:(=(2 now) -.sub +.sub))
101102 ::
102− [1 b=*]
103+ {$1 b/*}
103104 [%0 b.fol]
104105 ::
105− [2 b=[^ *]]
106+ {$2 b/{^ *}}
106107 =+ ben=$(fol b.fol)
107− ?. ?=(%0 -.ben) ben
108+ ?. ?=($0 -.ben) ben
108109 ?>(?=(^ p.ben) $(sub -.p.ben, fol +.p.ben))
109110 ::?>(?=(^ p.ben) $([sub fol] p.ben)
110111 ::
111− [3 b=*]
112+ {$3 b/*}
112113 =+ ben=$(fol b.fol)
113− ?. ?=(%0 -.ben) ben
114+ ?. ?=($0 -.ben) ben
114115 [%0 .?(p.ben)]
115116 ::
116− [4 b=*]
117+ {$4 b/*}
117118 =+ ben=$(fol b.fol)
118− ?. ?=(%0 -.ben) ben
119+ ?. ?=($0 -.ben) ben
119120 ?. ?=(@ p.ben) [%2 tax]
120121 [%0 .+(p.ben)]
121122 ::
122− [5 b=*]
123+ {$5 b/*}
123124 =+ ben=$(fol b.fol)
124− ?. ?=(%0 -.ben) ben
125+ ?. ?=($0 -.ben) ben
125126 ?. ?=(^ p.ben) [%2 tax]
126127 [%0 =(-.p.ben +.p.ben)]
127128 ::
128− [6 b=* c=* d=*]
129+ {$6 b/* c/* d/*}
129130 $(fol =>(fol [2 [0 1] 2 [1 c d] [1 0] 2 [1 2 3] [1 0] 4 4 b]))
130131 ::
131− [7 b=* c=*] $(fol =>(fol [2 b 1 c]))
132− [8 b=* c=*] $(fol =>(fol [7 [[0 1] b] c]))
133− [9 b=* c=*] $(fol =>(fol [7 c 0 b]))
134− [10 @ c=*] $(fol c.fol)
135− [10 [b=* c=*] d=*]
132+ {$7 b/* c/*} $(fol =>(fol [2 b 1 c]))
133+ {$8 b/* c/*} $(fol =>(fol [7 [[0 1] b] c]))
134+ {$9 b/* c/*} $(fol =>(fol [7 c 0 b]))
135+ {$10 @ c/*} $(fol c.fol)
136+ {$10 {b/* c/*} d/*}
136137 =+ ben=$(fol c.fol)
137− ?. ?=(%0 -.ben) ben
138− ?: ?=(?(%hunk %lose %mean %spot) b.fol)
138+ ?. ?=($0 -.ben) ben
139+ ?: ?=(?($hunk $hand $lose $mean $spot) b.fol)
139140 $(fol d.fol, tax [[b.fol p.ben] tax])
140141 $(fol d.fol)
141142 ::
142− [11 b=*]
143− =+ ben=$(fol b.fol)
144− ?. ?=(%0 -.ben) ben
145− =+ val=(sky p.ben)
146− ?~(val [%1 p.ben ~] [%0 u.val])
147− ::
143+ {$11 b/* c/*}
144+ =+ ref=$(fol b.fol)
145+ =+ ben=$(fol c.fol)
146+ ?. ?=($0 -.ref) ref
147+ ?. ?=($0 -.ben) ben
148+ =+ val=(gul p.ref p.ben)
149+ ?~(val [%1 p.ben ~] ?~(u.val [%2 [[%hunk (mush p.ben)] tax]] [%0 u.u.val]))
148150 ==
149151 ::
150152
153+
151154Examples
152155--------
153156
154− ~zod/try=> (mink [20 [4 0 1]] ,~)
157+ ~zod/try=> (mink [20 [4 0 1]] $~)
155158 [%0 p=21]
156− ~zod/try=> (mink [[90 5 3] [0 3]] ,~)
159+ ~zod/try=> (mink [[90 5 3] [0 3]] $~)
157160 [%0 p=[5 3]]
158− ~zod/try=> (mink 20^[4 0 1] ,~)
161+ ~zod/try=> (mink 20^[4 0 1] $~)
159162 [%0 p=21]
160− ~zod/try=> (mink [90 5 3]^[0 3] ,~)
163+ ~zod/try=> (mink [90 5 3]^[0 3] $~)
161164 [%0 p=[5 3]]
162− ~zod/try=> (mink [0]^[11 1 20] ,~)
165+ ~zod/try=> (mink [0]^[11 1 20] $~)
163166 [%1 p=~[20]]
164167 ~zod/try=> (mink [0]^[11 1 20] |=(a=* `[40 a]))
165168 [%0 p=[40 20]]
166− ~zod/try=> (mink [5]^[0 2] ,~)
169+ ~zod/try=> (mink [5]^[0 2] $~)
167170 [%2 p=~]
168− ~zod/try=> (mink [5]^[10 yelp/[0 1] 0 0] ,~)
171+ ~zod/try=> (mink [5]^[10 yelp/[0 1] 0 0] $~)
169172 [%2 p=~[[~.yelp 5]]]
170173
171174
@@ -174,19 +177,19 @@ Examples
174177
175178Compute formula on subject with hint
176179
177−Produces a [`++toon`](), which is either a sucessful, blocked, or
180+Produces a `++toon`, which is either a sucessful, blocked, or
178181crashed result. If nock 11 is invoked, `sky` computes on the subject and
179−produces a [`++unit`]() result. An empty result becomes a `%1` `++tune`,
182+produces a `++unit` result. An empty result becomes a `%1` `++tune`,
180183indicating a block.
181184
182185Accepts
183186-------
184187
185−`sub` is the subject as a [noun]().
188+`sub` is the subject as a noun.
186189
187190`fol` is the formula as a noun.
188191
189−`sky` is an [%iron]() gate invoked with [nock operator 11]().
192+`sky` is an %iron gate invoked with nock operator 11.
190193
191194Produces
192195--------
@@ -197,10 +200,11 @@ Source
197200------
198201
199202 ++ mock
200− |= [[sub=* fol=*] sky=$+(* (unit))]
201− (mook (mink [sub fol] sky))
203+ |= {{sub/* fol/*} gul/$-({* *} (unit (unit)))}
204+ (mook (mink [sub fol] gul))
202205 ::
203206
207+
204208Examples
205209--------
206210
@@ -226,17 +230,17 @@ Examples
226230
227231Slam gate with sample
228232
229−Produces a [`++toon`]() computation result from slamming `gat` with
233+Produces a `++toon` computation result from slamming `gat` with
230234`sam`, using `sky` to compute or block on nock 11 when applicable.
231235
232236Accepts
233237-------
234238
235−`gat` is a [noun]() that is generally a [`gate`]().
239+`gat` is a noun that is generally a `gate`.
236240
237−`sam` is a [`sample`]() noun.
241+`sam` is a `sample` noun.
238242
239−`sky` is an [%iron]() gate invoked with [nock operator 11]().
243+`sky` is an %iron gate invoked with nock operator 11.
240244
241245Produces
242246--------
@@ -247,11 +251,11 @@ Source
247251------
248252
249253 ++ mong
250− |= [[gat=* sam=*] sky=$+(* (unit))]
254+ |= {{gat/* sam/*} gul/$-({* *} (unit (unit)))}
251255 ^- toon
252256 ?. &(?=(^ gat) ?=(^ +.gat))
253257 [%2 ~]
254− (mock [[-.gat [sam +>.gat]] -.gat] sky)
258+ (mock [[-.gat [sam +>.gat]] -.gat] gul)
255259 ::
256260
257261Examples
@@ -261,19 +265,19 @@ Examples
261265 [%0 p=20]
262266 ~zod/try=> (mong [|=(@ !!) ~] ,~)
263267 [%2 p=~]
264− ~zod/try=> (mong [|=(a=@ (add 20 a)) ~] ,~)
268+ ~zod/try=> (mong [|=(a/@ (add 20 a)) ~] ,~)
265269 [%0 p=20]
266− ~zod/try=> (mong [|=(a=[@ @] (add 20 -.a)) ~] ,~)
270+ ~zod/try=> (mong [|=(a/[@ @] (add 20 -.a)) ~] ,~)
267271 [%2 p=~]
268− ~zod/try=> (mong [|=(a=[@ @] (add 20 -.a)) [4 6]] ,~)
272+ ~zod/try=> (mong [|=(a/[@ @] (add 20 -.a)) [4 6]] ,~)
269273 [%0 p=24]
270− ~zod/try=> (mong [|=(a=@ .^(a)) ~] ,~)
274+ ~zod/try=> (mong [|=(a/@ .^(a)) ~] ,~)
271275 [%1 p=~[0]]
272− ~zod/try=> (mong [|=(a=@ .^(a)) ~] ,[~ %42])
276+ ~zod/try=> (mong [|=(a/@ .^(a)) ~] ,[~ %42])
273277 [%0 p=42]
274− ~zod/try=> (mong [|=(a=@ .^(a)) ~] |=(a=* [~ a 6]))
278+ ~zod/try=> (mong [|=(a/@ .^(a)) ~] |=(a/* [~ a 6]))
275279 [%0 p=[0 6]]
276− ~zod/try=> (mong [|=(a=@ .^(a)) 8] |=(a=* [~ a 6]))
280+ ~zod/try=> (mong [|=(a/@ .^(a)) 8] |=(a/* [~ a 6]))
277281 [%0 p=[8 6]]
278282
279283
@@ -283,67 +287,56 @@ Examples
283287
284288Intelligently render crash annotation
285289
286−Converts a `%2` `++tone` nock stack trace to a list of [`++tank`]().
287−Each may be a tank, cord, [`++spot`](), or trapped tank.
290+Converts a `%2` `++tone` nock stack trace to a list of `++tank`.
291+Each may be a tank, cord, `++spot`, or trapped tank.
288292
289293Accepts
290294-------
291295
292−`ton` is a [`++tone`]().
296+`ton` is a `++tone`.
293297
294298Produces
295299--------
296300
297−A [`++toon`]().
301+A `++toon`.
298302
299303Source
300304------
301305
302306 ++ mook
303− |= ton=tone
307+ |= ton/tone
304308 ^- toon
305− ?. ?=([2 *] ton) ton
309+ ?. ?=({$2 *} ton) ton
306310 :- %2
311+ :: =. p.ton (moop p.ton)
307312 =+ yel=(lent p.ton)
308313 =. p.ton
309314 ?. (gth yel 256) p.ton
310315 %+ weld
311316 (scag 128 p.ton)
312− ^- (list ,[@ta *])
317+ ^- (list {@ta *})
313318 :_ (slag (sub yel 128) p.ton)
314319 :- %lose
315320 %+ rap 3
316− ;: weld
317− "[skipped "
318− ~(rend co %$ %ud (sub yel 256))
319− " frames]"
320− ==
321+ "[skipped {(scow %ud (sub yel 256))} frames]"
321322 |- ^- (list tank)
322323 ?~ p.ton ~
323− =+ rex=$(p.ton t.p.ton)
324− ?+ -.i.p.ton rex
325− %hunk [(tank +.i.p.ton) rex]
326− %lose [[%leaf (rip 3 (,@ +.i.p.ton))] rex]
327− %mean :_ rex
328− ?@ +.i.p.ton [%leaf (rip 3 (,@ +.i.p.ton))]
324+ =+ rep=$(p.ton t.p.ton)
325+ ?+ -.i.p.ton rep
326+ $hunk [(tank +.i.p.ton) rep]
327+ $lose [[%leaf (rip 3 (@ +.i.p.ton))] rep]
328+ $hand [[%leaf (scow %p (mug +.i.p.ton))] rep]
329+ $mean :_ rep
330+ ?@ +.i.p.ton [%leaf (rip 3 (@ +.i.p.ton))]
329331 =+ mac=(mack +.i.p.ton +<.i.p.ton)
330332 ?~(mac [%leaf "####"] (tank u.mac))
331− %spot :_ rex
333+ $spot :_ rep
332334 =+ sot=(spot +.i.p.ton)
333− :- %leaf
334− ;: weld
335− ~(ram re (smyt p.sot))
336− ":<["
337− ~(rend co ~ %ud p.p.q.sot)
338− " "
339− ~(rend co ~ %ud q.p.q.sot)
340− "].["
341− ~(rend co ~ %ud p.q.q.sot)
342− " "
343− ~(rend co ~ %ud q.q.q.sot)
344− "]>"
345− ==
346− ==
335+ :+ %rose [":" ~ ~]
336+ :~ (smyt p.sot)
337+ => [ud=|=(a/@u (scow %ud a)) q.sot]
338+ leaf+"<[{(ud p.p)} {(ud q.p)}].[{(ud p.q)} {(ud q.q)}]>"
339+ == ==
347340 ::
348341
349342Examples
@@ -367,13 +360,13 @@ Examples
367360
368361Typed virtual
369362
370−Kicks a [`++trap`](), producing its results or any errors that occur along
363+Kicks a `++trap`, producing its results or any errors that occur along
371364the way. Used to lazily compute stack traces.
372365
373366Accepts
374367-------
375368
376−`taq` is a [`++trap`](), generally producing a list of [`++tank`]()s.
369+`taq` is a `++trap`, generally producing a list of `++tank`s.
377370
378371Produces
379372--------
@@ -385,14 +378,15 @@ Source
385378
386379 ++ mule :: typed virtual
387380 ~/ %mule
388− |* taq=_|.(_*)
381+ |* taq/_|.(**)
389382 =+ mud=(mute taq)
390383 ?- -.mud
391− & [%& p=$:taq]
392− | [%| p=p.mud]
384+ $& [%& p=$:taq] :: XX transition
385+ $| [%| p=p.mud]
393386 ==
394387 ::
395388
389+
396390Examples
397391--------
398392
@@ -422,32 +416,32 @@ Examples
422416Untyped virtual
423417
424418Kicks a `++trap`, producing its result as a noun or the tanks of any
425−error that occurs. Similar to [`++mule`](), but preserves no type
419+error that occurs. Similar to `++mule`, but preserves no type
426420information.
427421
428422Accepts
429423-------
430424
431−`taq` is a [`++trap`](/doc/hoon/library/1#++trap).
432−
425+`taq` is a `++trap`.
433426Produces
434427--------
435428
436−Either a noun or a [`++list`]() of [`++tank`]().
429+Either a noun or a `++list` of `++tank`.
437430
438431Source
439432------
440433
441434 ++ mute :: untyped virtual
442− |= taq=_^?(|.(_*))
443− ^- (each ,* (list tank))
444− =+ ton=(mock [taq 9 2 0 1] |=(* ~))
435+ |= taq/_^?(|.(**))
436+ ^- (each * (list tank))
437+ =+ ton=(mock [taq 9 2 0 1] |=({* *} ~))
445438 ?- -.ton
446− %0 [%& p.ton]
447− %1 [%| (turn p.ton |=(a=* (smyt (path a))))]
448− %2 [%| p.ton]
439+ $0 [%& p.ton]
440+ $1 [%| (turn p.ton |=(a/* (smyt (path a))))]
441+ $2 [%| p.ton]
449442 ==
450443
444+
451445Examples
452446--------
453447
@@ -455,17 +449,6 @@ Examples
455449 [%.y p=[1.717.658.988 104 101 108 108 111 0]]
456450 ~zod/try=> (mute |.(!!))
457451 [%.n p=~]
458− ~zod/try=> (mute |.(.^(a//=pals/1)))
459− [ %.n
460− p
461− ~[
462− [ %rose
463− p=[p="/" q="/" r="/"]
464− q=[i=[%leaf p="a"] t=[i=[%leaf p="~zod"] t=[i=[%leaf p="pals"] t=[i=[%leaf p="1"] t=~]]]]
465− ]
466− ]
467− ]
468−
469452
470453
471454***
docs/system/hoon/library/5f.md+20−21
@@ -4,17 +4,17 @@
44XML name
55
66An XML name (tag name or attribute name) with an optional namespace. Parsed by
7−[`++name`]() within [`++poxa`](), rendered by [`++name`]() within `++poxo`.
7+`++name` within `++poxa`, rendered by `++name` within `++poxo`.
88
99Source
1010------
1111
12− ++ mane $|(@tas [@tas @tas]) :: XML name/space
12+ ++ mane $@(@tas [@tas @tas]) :: XML name/space
1313
1414Examples
1515--------
1616
17−See also: [`++sail`]()
17+See also: `++sail`
1818
1919 ~zod/try=> *mane
2020 %$
@@ -31,17 +31,17 @@ See also: [`++sail`]()
3131
3232XML node.
3333
34−Parsed by [`++apex`]() within [`++poxa`](), rendered by [`++poxo`]().
34+Parsed by `++apex` within `++poxa`, rendered by `++poxo`.
3535
3636Source
3737------
3838
39− ++ manx ,[g=marx c=marl] :: XML node
39+ ++ manx {g/marx c/marl} :: XML node
4040
4141Examples
4242--------
4343
44−See also: [`++sail`]() doc
44+See also: `++sail` doc
4545
4646
4747
@@ -68,12 +68,13 @@ Examples
6868
6969XML CDATA
7070
71−Implicitly produced by [`++chrd`]() within [`++poxa`]()
71+Implicitly produced by `++chrd` within `++poxa`
7272
7373Source
7474------
7575
76− ++ mars ,[t=[n=%$ a=[i=[n=%$ v=tape] t=~]] c=~] :: XML cdata
76+ ++ mars {t/{n/$$ a/{i/{n/$$ v/tape} t/$~}} c/$~} :: XML cdata
77+
7778
7879Examples
7980--------
@@ -85,15 +86,15 @@ Examples
8586
8687List of XML attributes
8788
88−Each `++mart` is a list of pairs of [`++mane`]() and
89−[`++tape`]().
89+Each `++mart` is a list of pairs of `++mane` and
90+`++tape`.
9091
91−Parsed by [`++attr`]() within [`++poxa`](), rendered by `++attr` within [`++poxo`]()
92+Parsed by `++attr` within `++poxa`, rendered by `++attr` within `++poxo`
9293
9394Source
9495------
9596
96− ++ mart (list ,[n=mane v=tape]) :: XML attributes
97+ ++ mart (list {n/mane v/tape}) :: XML attributes
9798
9899Examples
99100--------
@@ -106,12 +107,12 @@ Examples
106107XML tag
107108
108109A `++marx` is a pair of a tag name, `++mane` and a list of attributes,
109−`++mart`. Parsed by [`++head`]() `++poxa`, rendered within `++poxo`.
110+`++mart`. Parsed by `++head` `++poxa`, rendered within `++poxo`.
110111
111112Source
112113------
113114
114− ++ marx ,[n=mane a=mart] :: XML tag
115+ ++ marx {n/mane a/mart} :: XML tag
115116
116117Examples
117118--------
@@ -128,7 +129,7 @@ Used primarily in crypto.
128129Source
129130------
130131
131− ++ pass ,@ :: public key
132+ ++ pass @ :: public key
132133
133134
134135
@@ -142,7 +143,7 @@ Used primarily in crypto.
142143Source
143144------
144145
145− ++ ring ,@ :: private key
146+ ++ ring @ :: private key
146147
147148
148149
@@ -156,16 +157,14 @@ The `@da` odor designates an absolute date atom.
156157Source
157158------
158159
159− ++ time ,@da :: galactic time
160+ ++ time @da :: galactic time
160161
161162Examples
162163--------
163164
164−See also: [`++date`](), [odor reference]()
165+See also: `++date`, odor reference
166+
165167
166− ~zod/try=> `time`-<-
167− ~2014.9.25..20.01.47..eeac
168− ~zod/try=> :: the time is always in your context at -<-
169168 ~zod/try=> `time`~2014.1.1
170169 ~2014.1.1
171170