on master help sign in
Merge branch 'cleanorg' of http://github.com/urbit/docs into cleanorg

Conflicts: docs/system/hoon/runes/bc/pick.md

commit5f26fcc51f608f90d234d1381bee7e2b8c3eeb21 authorC. Guy Yarvin <cgyarvin@gmail.com> dateFri 1 Apr 2016, 12:33 (11 years ago) parent73e4cdc00e6334
154 files changed+4856−7290
docs.md+2−1 docs/system/hoon/library/$.md+173 docs/system/hoon/library/1a.md+78−81 docs/system/hoon/library/1b.md+42−43 docs/system/hoon/library/1c.md+73−61 docs/system/hoon/library/2a.md+79−69 docs/system/hoon/library/2b.md+158−125 docs/system/hoon/library/2c.md+140−136 docs/system/hoon/library/2d.md+42−41 docs/system/hoon/library/2e.md+25−33 docs/system/hoon/library/2f.md+51−45 docs/system/hoon/library/2g.md+1−1 docs/system/hoon/library/2h.md+106−97 docs/system/hoon/library/2i.md+150−138 docs/system/hoon/library/2j.md+65−215 docs/system/hoon/library/2k.md+63−59 docs/system/hoon/library/2n.md+49−43 docs/system/hoon/library/2o.md+48−46 docs/system/hoon/library/2p.md+35−34 docs/system/hoon/library/2q.md+53−78 docs/system/hoon/library/3a.md+218−216 docs/system/hoon/library/3c.md+309−302 docs/system/hoon/library/3d.md+75−154 docs/system/hoon/library/3e.md+13−67 docs/system/hoon/library/3f.md+105−94 docs/system/hoon/library/3g.md+74−59 docs/system/hoon/library/4a.md+72−69 docs/system/hoon/library/4b.md+303−300 docs/system/hoon/library/4c.md+135−147 docs/system/hoon/library/4d.md+17−17 docs/system/hoon/library/4e.md+75−72 docs/system/hoon/library/4f.md+221−201 docs/system/hoon/library/4g.md+29−26 docs/system/hoon/library/4h.md+135−135 docs/system/hoon/library/4j.md+193−192 docs/system/hoon/library/4k.md+383−457 docs/system/hoon/library/4l.md+235−116 docs/system/hoon/library/4m.md+104−98 docs/system/hoon/library/4n.md+133−150 docs/system/hoon/library/4o.md+60−60 docs/system/hoon/library/5f.md+24−25 docs/system/hoon/runes/bc/shoe.md → docs/system/hoon/runes/bc/bccb.md+3−3 docs/system/hoon/runes/bc/bank.md → docs/system/hoon/runes/bc/bccl.md+3−3 docs/system/hoon/runes/bc/book.md → docs/system/hoon/runes/bc/bccn.md+4−4 docs/system/hoon/runes/bc/bchp.md+15 docs/system/hoon/runes/bc/bush.md → docs/system/hoon/runes/bc/bcpm.md+4−5 docs/system/hoon/runes/bc/claw.md → docs/system/hoon/runes/bc/bcpt.md+4−4 docs/system/hoon/runes/bc/bcts.md+21 docs/system/hoon/runes/bc/bcwt.md+23 docs/system/hoon/runes/bc/coat.md−21 docs/system/hoon/runes/bc/lamb.md−15 docs/system/hoon/runes/bc/pick.md−29 docs/system/hoon/runes/br/brcb.md+14−31 docs/system/hoon/runes/br/brcn.md+19−58 docs/system/hoon/runes/br/brdt.md+6−25 docs/system/hoon/runes/br/brfs.md−93 docs/system/hoon/runes/br/brhp.md+5−25 docs/system/hoon/runes/br/brkt.md+12−32 docs/system/hoon/runes/br/brls.md+10−31 docs/system/hoon/runes/br/brtr.md+10−32 docs/system/hoon/runes/br/brts.md+6−35 docs/system/hoon/runes/br/brwt.md+23−45 docs/system/hoon/runes/cl/clcb.md+5−26 docs/system/hoon/runes/cl/clfs.md+2−23 docs/system/hoon/runes/cl/clhp.md+15−29 docs/system/hoon/runes/cl/clkt.md+3−36 docs/system/hoon/runes/cl/clls.md+5−29 docs/system/hoon/runes/cl/clsg.md+5−32 docs/system/hoon/runes/cl/cltr.md+3−30 docs/system/hoon/runes/dt/dtkt.md+7−46 docs/system/hoon/runes/dt/dtls.md+5−27 docs/system/hoon/runes/dt/dttr.md+4−31 docs/system/hoon/runes/dt/dtts.md+6−32 docs/system/hoon/runes/dt/dtwt.md+4−24 docs/system/hoon/runes/dt/dtzy.md−47 docs/system/hoon/runes/dt/dtzz.md−47 docs/system/hoon/runes/kt/ktbr.md+8−28 docs/system/hoon/runes/kt/ktdt.md+4−20 docs/system/hoon/runes/kt/kthp.md+8−28 docs/system/hoon/runes/kt/ktls.md+8−34 docs/system/hoon/runes/kt/ktpm.md+10−39 docs/system/hoon/runes/kt/ktsg.md+3−22 docs/system/hoon/runes/kt/ktts.md+4−31 docs/system/hoon/runes/kt/ktwt.md+5−28 docs/system/hoon/runes/sg/sgbc.md+3−24 docs/system/hoon/runes/sg/sgbr.md+7−21 docs/system/hoon/runes/sg/sgcb.md+4−25 docs/system/hoon/runes/sg/sgcn.md+6−34 docs/system/hoon/runes/sg/sgfs.md+5−26 docs/system/hoon/runes/sg/sggl.md+4−33 docs/system/hoon/runes/sg/sggr.md+4−33 docs/system/hoon/runes/sg/sgls.md+4−24 docs/system/hoon/runes/sg/sgpm.md+5−50 docs/system/hoon/runes/sg/sgts.md+3−24 docs/system/hoon/runes/sg/sgwt.md+4−43 docs/system/hoon/runes/sg/sgzp.md+4−34 docs/system/hoon/runes/sm/smcl.md+6−38 docs/system/hoon/runes/sm/smcn.md−82 docs/system/hoon/runes/sm/smdq.md−46 docs/system/hoon/runes/sm/smhp.md−45 docs/system/hoon/runes/sm/smls.md−48 docs/system/hoon/runes/sm/smsg.md+4−28 docs/system/hoon/runes/sm/smsm.md+4−33 docs/system/hoon/runes/sm/smtr.md−50 docs/system/hoon/runes/sm/smzz.md−79 docs/system/hoon/runes/ts/.tsbr.md.swp docs/system/hoon/runes/ts/.tscl.md.swp docs/system/hoon/runes/ts/.tsdt.md.swp docs/system/hoon/runes/ts/.tsgl.md.swp docs/system/hoon/runes/ts/.tsgr.md.swp docs/system/hoon/runes/ts/.tshp.md.swp docs/system/hoon/runes/ts/.tskt.md.swp docs/system/hoon/runes/ts/.tsls.md.swp docs/system/hoon/runes/ts/.tssg.md.swp docs/system/hoon/runes/ts/.tstr.md.swp docs/system/hoon/runes/ts/tsbr.md+6−7 docs/system/hoon/runes/ts/tscl.md+4−29 docs/system/hoon/runes/ts/tsdt.md+2−35 docs/system/hoon/runes/ts/tsgl.md+7−37 docs/system/hoon/runes/ts/tsgr.md+7−28 docs/system/hoon/runes/ts/tshp.md+6−32 docs/system/hoon/runes/ts/tskt.md+7−44 docs/system/hoon/runes/ts/tsls.md+5−33 docs/system/hoon/runes/ts/tssg.md+3−34 docs/system/hoon/runes/ts/tstr.md+3−29 docs/system/hoon/runes/wt/wtbr.md+5−29 docs/system/hoon/runes/wt/wtcl.md+5−25 docs/system/hoon/runes/wt/wtdt.md+11−32 docs/system/hoon/runes/wt/wtgl.md+3−28 docs/system/hoon/runes/wt/wtgr.md+4−30 docs/system/hoon/runes/wt/wthp.md+10−43 docs/system/hoon/runes/wt/wtkt.md+7−30 docs/system/hoon/runes/wt/wtls.md+10−55 docs/system/hoon/runes/wt/wtpm.md+6−30 docs/system/hoon/runes/wt/wtpt.md+2−32 docs/system/hoon/runes/wt/wtsg.md+3−28 docs/system/hoon/runes/wt/wtts.md+5−25 docs/system/hoon/runes/wt/wtzp.md+3−28 docs/system/hoon/runes/zp/.zpcb.md.swp docs/system/hoon/runes/zp/.zpcm.md.swp docs/system/hoon/runes/zp/.zpfs.md.swp docs/system/hoon/runes/zp/.zpgr.md.swp docs/system/hoon/runes/zp/.zpsm.md.swp docs/system/hoon/runes/zp/.zpts.md.swp docs/system/hoon/runes/zp/.zpwt.md.swp docs/system/hoon/runes/zp/.zpzp.md.swp docs/system/hoon/runes/zp/zpcb.md−57 docs/system/hoon/runes/zp/zpcm.md+2−22 docs/system/hoon/runes/zp/zpfs.md−59 docs/system/hoon/runes/zp/zpgr.md+4−26 docs/system/hoon/runes/zp/zpsm.md+3−24 docs/system/hoon/runes/zp/zpts.md+4−24 docs/system/hoon/runes/zp/zpwt.md+4−27 docs/system/hoon/runes/zp/zpzp.md+6−25
docs.md+2−1
@@ -1,5 +1,6 @@
11---
22anchor: none
3+footer: true
34---
45
56<div class="lead">
@@ -8,5 +9,5 @@ anchor: none
89</div>
910
1011<div class="sections lead-offset">
11− <kids></kids>
12+ <kids grid="true"></kids>
1213</div>
docs/system/hoon/library/$.mdnew file+173
@@ -0,0 +1,173 @@
1+# 5f: molds and mold builders
2+### `++mane`
3+
4+XML name
5+
6+An XML name (tag name or attribute name) with an optional namespace. Parsed by
7+`++name` within `++poxa`, rendered by `++name` within `++poxo`.
8+
9+Source
10+------
11+
12+ ++ mane $@(@tas [@tas @tas]) :: XML name/space
13+
14+Examples
15+--------
16+
17+See also: `++sail`
18+
19+ > *mane
20+ %$
21+
22+ > `mane`n.g:`manx`;div:namespace;
23+ %div
24+ > `mane`n.g:`manx`;div_namespace;
25+ [%div %namespace]
26+
27+
28+
29+***
30+### `++manx`
31+
32+XML node.
33+
34+Parsed by `++apex` within `++poxa`, rendered by `++poxo`.
35+
36+Source
37+------
38+
39+ ++ manx {g/marx c/marl} :: XML node
40+
41+Examples
42+--------
43+
44+See also: `++sail` doc
45+
46+
47+
48+***
49+### `++marl`
50+
51+List of XML nodes
52+
53+A list of [`++manx`]().
54+
55+Source
56+------
57+
58+ ++ marl (list manx) :: XML node list
59+
60+Examples
61+--------
62+
63+
64+
65+
66+***
67+### `++mars`
68+
69+XML CDATA
70+
71+Implicitly produced by `++chrd` within `++poxa`
72+
73+Source
74+------
75+
76+ ++ mars {t/{n/$$ a/{i/{n/$$ v/tape} t/$~}} c/$~} :: XML cdata
77+
78+
79+Examples
80+--------
81+
82+
83+
84+***
85+### `++mart`
86+
87+List of XML attributes
88+
89+Each `++mart` is a list of pairs of `++mane` and
90+`++tape`.
91+
92+Parsed by `++attr` within `++poxa`, rendered by `++attr` within `++poxo`
93+
94+Source
95+------
96+
97+ ++ mart (list {n/mane v/tape}) :: XML attributes
98+
99+Examples
100+--------
101+
102+
103+
104+***
105+### `++marx`
106+
107+XML tag
108+
109+A `++marx` is a pair of a tag name, `++mane` and a list of attributes,
110+`++mart`. Parsed by `++head` `++poxa`, rendered within `++poxo`.
111+
112+Source
113+------
114+
115+ ++ marx {n/mane a/mart} :: XML tag
116+
117+Examples
118+--------
119+
120+
121+
122+***
123+### `++pass`
124+
125+Atom alias
126+
127+Used primarily in crypto.
128+
129+Source
130+------
131+
132+ ++ pass @ :: public key
133+
134+
135+
136+***
137+### `++ring`
138+
139+Atom alias
140+
141+Used primarily in crypto.
142+
143+Source
144+------
145+
146+ ++ ring @ :: private key
147+
148+
149+
150+***
151+### `++time`
152+
153+Absolute date
154+
155+The `@da` odor designates an absolute date atom.
156+
157+Source
158+------
159+
160+ ++ time @da :: galactic time
161+
162+Examples
163+--------
164+
165+See also: `++date`, odor reference
166+
167+
168+ > `time`~2014.1.1
169+ ~2014.1.1
170+
171+
172+
173+***
docs/system/hoon/library/1a.md+78−81
@@ -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))
@@ -30,11 +30,11 @@ Source
3030Examples
3131--------
3232
33− ~zod/try=> (add 2 2)
33+ > (add 2 2)
3434 4
35− ~zod/try=> (add 1 1.000.000)
35+ > (add 1 1.000.000)
3636 1.000.001
37− ~zod/try=> (add 1.333 (mul 2 2))
37+ > (add 1.333 (mul 2 2))
3838 1.337
3939
4040***
@@ -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,21 +59,20 @@ 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--------
7372
74− ~zod/try=> (dec 7)
73+ > (dec 7)
7574 6
76− ~zod/try=> (dec 0)
75+ > (dec 0)
7776 ! decrement-underflow
7877 ! exit
7978
@@ -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)
@@ -116,11 +115,11 @@ Source
116115Examples
117116--------
118117
119− ~zod/try=> (div 4 2)
118+ > (div 4 2)
120119 2
121− ~zod/try=> (div 17 8)
120+ > (div 17 8)
122121 2
123− ~zod/try=> (div 20 30)
122+ > (div 20 30)
124123 0
125124
126125
@@ -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,19 +147,19 @@ Source
148147
149148 ++ gte :: greater-equal
150149 ~/ %gte
151− |= [a=@ b=@]
150+ |= {a/@ b/@}
152151 ^- ?
153152 !(lth a b)
154− ::
153+
155154
156155Examples
157156--------
158157
159− ~zod/try=> (gte 100 10)
158+ > (gte 100 10)
160159 %.y
161− ~zod/try=> (gte 4 4)
160+ > (gte 4 4)
162161 %.y
163− ~zod/try=> (gte 3 4)
162+ > (gte 3 4)
164163 %.n
165164
166165
@@ -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,17 +188,18 @@ 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--------
199199
200− ~zod/try=> (gth 'd' 'c')
200+ > (gth 'd' 'c')
201201 %.y
202− ~zod/try=> (gth ~h1 ~m61)
202+ > (gth ~h1 ~m61)
203203 %.n
204204
205205
@@ -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,20 +228,21 @@ Source
228228
229229 ++ lte :: less-equal
230230 ~/ %lte
231− |= [a=@ b=@]
231+ |= {a/@ b/@}
232232 |(=(a b) (lth a b))
233+
233234 ::
234235
235236Examples
236237--------
237238
238− ~zod/try=> (lte 4 5)
239+ > (lte 4 5)
239240 %.y
240− ~zod/try=> (lte 5 4)
241+ > (lte 5 4)
241242 %.n
242− ~zod/try=> (lte 5 5)
243+ > (lte 5 5)
243244 %.y
244− ~zod/try=> (lte 0 0)
245+ > (lte 0 0)
245246 %.y
246247
247248
@@ -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,26 +271,25 @@ 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--------
285285
286− ~zod/try=> (lth 4 5)
286+ > (lth 4 5)
287287 %.y
288− ~zod/try=> (lth 5 4)
288+ > (lth 5 4)
289289 %.n
290− ~zod/try=> (lth 5 5)
290+ > (lth 5 5)
291291 %.n
292− ~zod/try=> (lth 5 0)
292+ > (lth 5 0)
293293 %.n
294294
295295
@@ -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,20 +317,19 @@ 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--------
328327
329− ~zod/try=> (max 10 100)
328+ > (max 10 100)
330329 100
331− ~zod/try=> (max 10.443 9)
330+ > (max 10.443 9)
332331 10.443
333− ~zod/try=> (max 0 1)
332+ > (max 0 1)
334333 1
335334
336335
@@ -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,20 +358,19 @@ 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
371− ~zod/try=> (min 10 100)
369+ > (min 10 100)
372370 10
373− ~zod/try=> (min 10.443 9)
371+ > (min 10.443 9)
374372 9
375− ~zod/try=> (min 0 1)
373+ > (min 0 1)
376374 0
377375
378376
@@ -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,18 +399,18 @@ 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--------
412410
413− ~zod/try=> (mod 5 2)
411+ > (mod 5 2)
414412 1
415− ~zod/try=> (mod 5 5)
413+ > (mod 5 5)
416414 0
417415
418416
@@ -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,20 +439,19 @@ 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
455− ~zod/try=> (mul 3 4)
452+ > (mul 3 4)
456453 12
457− ~zod/try=> (mul 0 1)
454+ > (mul 0 1)
458455 0
459456
460457
@@ -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,24 +478,24 @@ 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--------
494491
495− ~zod/try=> (sub 10 5)
492+ > (sub 10 5)
496493 5
497− ~zod/try=> (sub 243 44)
494+ > (sub 243 44)
498495 199
499− ~zod/try=> (sub 5 0)
496+ > (sub 5 0)
500497 5
501− ~zod/try=> (sub 0 5)
498+ > (sub 0 5)
502499 ! subtract-underflow
503500 ! exit
504501
docs/system/hoon/library/1b.md+42−43
@@ -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,31 +15,31 @@ 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--------
3737
38− ~zod/try=> (cap 4)
38+ > (cap 4)
3939 %2
40− ~zod/try=> (cap 6)
40+ > (cap 6)
4141 %3
42− ~zod/try=> (cap (add 10 9))
42+ > (cap (add 10 9))
4343 %2
4444
4545
@@ -64,32 +64,32 @@ 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--------
8181
82− ~zod/try=> (mas 3)
82+ > (mas 3)
8383 1
84− ~zod/try=> (mas 4)
84+ > (mas 4)
8585 2
86− ~zod/try=> (mas 5)
86+ > (mas 5)
8787 3
88− ~zod/try=> (mas 6)
88+ > (mas 6)
8989 2
90− ~zod/try=> (mas 0)
90+ > (mas 0)
9191 ! exit
92− ~zod/try=> (mas 1)
92+ > (mas 1)
9393 ! exit
9494
9595
@@ -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,24 +118,23 @@ 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--------
133132
134− ~zod/try=> (peg 4 1)
133+ > (peg 4 1)
135134 4
136− ~zod/try=> (peg 4 2)
135+ > (peg 4 2)
137136 8
138− ~zod/try=> (peg 8 45)
137+ > (peg 8 45)
139138 269
140139
141140
docs/system/hoon/library/1c.md+73−61
@@ -5,19 +5,18 @@ 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--------
1615
17− ~zod/try=> :: ++met measures how many bloqs long an atom is
18− ~zod/try=> (met 3 256)
16+ > :: ++met measures how many bloqs long an atom is
17+ > (met 3 256)
1918 2
20− ~zod/try=> :: 256 is 2 bloqs of 2^3
19+ > :: 256 is 2 bloqs of 2^3
2120
2221
2322***
@@ -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,61 +75,62 @@ 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
132131--------
133132
134− ~zod/try=> *(pair bean cord)
133+ > *(pair bean cord)
135134 [p=%.y q='']
136135
137136
@@ -141,17 +140,20 @@ 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--------
153155
154− ~zod/try=> `(pole char)`"asdf"
156+ > `(pole char)`"asdf"
155157 [~~a [~~s [~~d [~~f ~]]]]
156158
157159
@@ -166,38 +168,38 @@ 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--------
173176
174− ~zod/try=> *(qual date time tape cord)
177+ > *(qual date time tape cord)
175178 [p=[[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]] q=~292277024401-.1.1 r="" s='']
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−
196− ~zod/try=> *trap
198+ > *trap
197199 <1.mws 101.jzo 1.ypj %164>
198− ~zod/try=> (*trap)
200+ > (*trap)
199201 0
200− ~zod/try=> (|.(42))
202+ > (|.(42))
201203 42
202204
203205
@@ -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+ > `(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+ > *(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+ > ? *(unit time)
274+ ?({$~ u/@da} $~)
266275 ~
267− u(@da)
268− ~zod/try=> `(unit time)`[~ -<-]
269− [~ ~2014.9.24..19.25.10..7dd5]
270276
277+ > > =a |= a/@
278+ ^- (unit @)
279+ ?~ a ~
280+ [~ a]
281+ > (a 2)
282+ [~ u=2]
271283
272284
273285***
docs/system/hoon/library/2a.md+79−69
@@ -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+ > (biff (some 5) |=(a/@ (some (add a 2))))
3334 [~ u=7]
34− ~zod/try=> (biff ~ |=(a=@ (some (add a 2))))
35+ > (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+ > (bind ((unit @) [~ 97]) ,@t)
7274 [~ `a`]
73− ~zod/try=> =a |=(a=@ (add a 1))
74− ~zod/try=> (bind ((unit ,@) [~ 2]) a)
75+ > =a |=(a/@ (add a 1))
76+ > (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,19 +102,20 @@ 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
111− ~zod/try=> (bex 10)
114+ > (bex 10)
112115 1.024
113− ~zod/try=> ((bond |.((bex 10))) ~)
116+ > ((bond |.((bex 10))) ~)
114117 1.024
115− ~zod/try=> ((bond |.((bex 10))) (slaw %ud '123'))
118+ > ((bond |.((bex 10))) (slaw %ud '123'))
116119 123
117120
118121
@@ -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,17 +145,18 @@ 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
153− ~zod/try=> (both (some 1) (some %b))
157+ > (both (some 1) (some %b))
154158 [~ u=[1 %b]]
155− ~zod/try=> (both ~ (some %b))
159+ > (both ~ (some %b))
156160 ~
157161
158162
@@ -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,22 +186,23 @@ 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'])
195− ~zod/try=> (clap u v |=([a=@t b=@t] (welp (trip a) (trip b))))
198+ > =u ((unit @t) [~ 'a'])
199+ > =v ((unit @t) [~ 'b'])
200+ > (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])
199− ~zod/try=> =c |=([a=@ b=@] (add a b))
200− ~zod/try=> (clap a b c)
202+ > =a ((unit @u) [~ 1])
203+ > =b ((unit @u) [~ 2])
204+ > =c |=([a=@ b=@] (add a b))
205+ > (clap a b c)
201206 [~ 3]
202207
203208
@@ -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,18 +228,19 @@ 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])
234− ~zod/try=> (drop a)
239+ > =a ((unit @) [~ 97])
240+ > (drop a)
235241 [i=97 t=~]
236− ~zod/try=> =a ((unit ,@) [~])
237− ~zod/try=> (drop a)
242+ > =a ((unit @) [~])
243+ > (drop a)
238244 ~
239245
240246
@@ -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,15 +268,16 @@ Source
262268------
263269
264270 ++ fall :: default
265− |* [a=(unit) b=*]
271+ |* {a/(unit) b/*}
266272 ?~(a b u.a)
267273
274+
268275Examples
269276--------
270277
271− ~zod/try=> (fall ~ `a`)
278+ > (fall ~ `a`)
272279 `a`
273− ~zod/try=> (fall [~ u=0] `a`)
280+ > (fall [~ u=0] `a`)
274281 0
275282
276283
@@ -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+ > ((lift dec) `(unit @)`~)
311319 ~
312− ~zod/try=> ((lift dec) `(unit ,@)`[~ 20])
320+ > ((lift dec) `(unit @)`[~ 20])
313321 [~ 19]
314322
315323
@@ -340,26 +348,27 @@ 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])
354− ~zod/try=> (mate a b)
361+ > =a ((unit @) [~ 97])
362+ > =b ((unit @) [~ 97])
363+ > (mate a b)
355364 [~ 97]
356− ~zod/try=> =a ((unit ,@) [~ 97])
357− ~zod/try=> =b ((unit ,@) [~])
358− ~zod/try=> (mate a b)
365+ > =a ((unit @) [~ 97])
366+ > =b ((unit @) [~])
367+ > (mate a b)
359368 [~ 97]
360− ~zod/try=> =a ((unit ,@) [~ 97])
361− ~zod/try=> =b ((unit ,@) [~ 98])
362− ~zod/try=> (mate a b)
369+ > =a ((unit @) [~ 97])
370+ > =b ((unit @) [~ 98])
371+ > (mate a b)
363372 ! 'mate'
364373 ! exit
365374
@@ -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,21 +395,22 @@ 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']])
397− ~zod/try=> (need a)
406+ > =a ((unit [@t @t]) [~ ['a' 'b']])
407+ > (need a)
398408 ['a' 'b']
399− ~zod/try=> =a ((unit ,@ud) [~ 17])
400− ~zod/try=> (need a)
409+ > =a ((unit @ud) [~ 17])
410+ > (need a)
401411 17
402− ~zod/try=> =a ((unit ,@) [~])
403− ~zod/try=> (need a)
412+ > =a ((unit @) [~])
413+ > (need a)
404414 ! exit
405415
406416
@@ -432,9 +442,9 @@ Source
432442Examples
433443--------
434444
435− ~zod/try=> (some [`a` `b`])
445+ > (some [`a` `b`])
436446 [~ u=[`a` `b`]]
437− ~zod/try=> (some &)
447+ > (some &)
438448 [~ u=%.y]
439449
440450
docs/system/hoon/library/2b.md+158−125
@@ -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,11 +29,12 @@ Source
2929 $(a t.a, b [i.a b])
3030
3131
32+
3233Examples
3334--------
3435
35− ~zod/try=> =a (limo [1 2 3 ~])
36− ~zod/try=> (flop a)
36+ > =a (limo [1 2 3 ~])
37+ > (flop a)
3738 ~[3 2 1]
3839
3940
@@ -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,23 +61,24 @@ 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
72− ~zod/try=> lyst
74+ > lyst
7375 [i=1 t=[i=97 t=[i=2 t=[i=98 t=[i=[~ u=10] t=~]]]]]
74− ~zod/try=> (homo lyst)
76+ > (homo lyst)
7577 ~[1 97 2 98 [~ u=10]]
76− ~zod/try=> =a (limo [1 2 3 ~])
77− ~zod/try=> a
78+ > =a (limo [1 2 3 ~])
79+ > a
7880 [i=1 t=[i=2 t=[i=3 t=~]]]
79− ~zod/try=> (homo a)
81+ > (homo a)
8082 ~[1 2 3]
8183
8284
@@ -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,19 +105,20 @@ 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
116− ~zod/try=> (lent (limo [1 2 3 4 ~]))
119+ > (lent (limo [1 2 3 4 ~]))
117120 4
118− ~zod/try=> (lent (limo [1 'a' 2 'b' (some 10) ~]))
121+ > (lent (limo [1 'a' 2 'b' (some 10) ~]))
119122 5
120123
121124
@@ -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,25 +140,28 @@ 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))
155− ~zod/try=> (levy (limo [0 1 2 1 ~]) a)
160+ > =a |=(a/@ (lte a 1))
161+ > (levy (limo [0 1 2 1 ~]) a)
156162 %.n
157− ~zod/try=> =a |=(a=@ (lte a 3))
158− ~zod/try=> (levy (limo [0 1 2 1 ~]) a)
163+ > =a |=(a/@ (lte a 3))
164+ > (levy (limo [0 1 2 1 ~]) a)
159165 %.y
160166
161167
@@ -165,25 +171,34 @@ 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)
193+
194+Examples
195+--------
175196
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.
181−
182− ~zod/try=> =a |=(a=@ (gte a 1))
183− ~zod/try=> (lien (limo [0 1 2 1 ~]) a)
197+ > =a |=(a=@ (gte a 1))
198+ > (lien (limo [0 1 2 1 ~]) a)
184199 %.y
185− ~zod/try=> =a |=(a=@ (gte a 3))
186− ~zod/try=> (lien (limo [0 1 2 1 ~]) a)
200+ > =a |=(a=@ (gte a 3))
201+ > (lien (limo [0 1 2 1 ~]) a)
187202 %.n
188203
189204
@@ -203,7 +218,7 @@ Accepts
203218Produces
204219--------
205220
206−A list
221+A `++list`.
207222
208223Source
209224------
@@ -218,7 +233,7 @@ Source
218233Examples
219234--------
220235
221− ~zod/try=> (limo [1 2 3 ~])
236+ > (limo [1 2 3 ~])
222237 [i=1 t=[i=2 t=[i=3 t=~]]]
223238
224239
@@ -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)
@@ -259,8 +275,8 @@ Source
259275Examples
260276--------
261277
262− ~zod/try=> =a |=(a=@ ?.((gte a 2) ~ (some (add a 10))))
263− ~zod/try=> (murn (limo [0 1 2 3 ~]) a)
278+ > =a |=(a=@ ?.((gte a 2) ~ (some (add a 10))))
279+ > (murn (limo [0 1 2 3 ~]) a)
264280 [i=12 t=[i=13 t=~]]
265281
266282
@@ -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,19 +302,20 @@ 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
294311Examples
295312--------
296313
297− ~zod/try=> (reap 20 %a)
314+ > (reap 20 %a)
298315 ~[%a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a]
299− ~zod/try=> (reap 5 ~s1)
316+ > (reap 5 ~s1)
300317 ~[~s1 ~s1 ~s1 ~s1 ~s1]
301− ~zod/try=> `@dr`(roll (reap 5 ~s1) add)
318+ > `@dr`(roll (reap 5 ~s1) add)
302319 ~s5
303320
304321
@@ -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,29 +337,30 @@ 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
339− ~zod/try=> =sum =|([p=@ q=@] |.((add p q)))
340− ~zod/try=> (reel (limo [1 2 3 4 5 ~]) sum)
357+ > =sum =|([p=@ q=@] |.((add p q)))
358+ > (reel (limo [1 2 3 4 5 ~]) sum)
341359 15
342− ~zod/try=> =a =|([p=@ q=@] |.((sub p q)))
343− ~zod/try=> (reel (limo [6 3 1 ~]) a)
360+ > =a =|([p=@ q=@] |.((sub p q)))
361+ > (reel (limo [6 3 1 ~]) a)
344362 4
345− ~zod/try=> (reel (limo [3 6 1 ~]) a)
363+ > (reel (limo [3 6 1 ~]) a)
346364 ! subtract-underflow
347365 ! exit
348366
@@ -381,14 +399,14 @@ Source
381399Examples
382400--------
383401
384− ~zod/try=> =sum =|([p=@ q=@] |.((add p q)))
385− ~zod/try=> (roll (limo [1 2 3 4 5 ~]) sum)
402+ > =sum =|([p=@ q=@] |.((add p q)))
403+ > (roll (limo [1 2 3 4 5 ~]) sum)
386404 q=15
387− ~zod/try=> =a =|([p=@ q=@] |.((sub p q)))
388− ~zod/try=> (roll (limo [6 3 1 ~]) a)
405+ > =a =|([p=@ q=@] |.((sub p q)))
406+ > (roll (limo [6 3 1 ~]) a)
389407 ! subtract-underflow
390408 ! exit
391− ~zod/try=> (roll (limo [1 3 6 ~]) a)
409+ > (roll (limo [1 3 6 ~]) a)
392410 q=4
393411
394412
@@ -424,9 +442,9 @@ Source
424442Examples
425443--------
426444
427− ~zod/try=> (scag 2 (limo [0 1 2 3 ~]))
445+ > (scag 2 (limo [0 1 2 3 ~]))
428446 [i=0 t=[i=1 t=~]]
429− ~zod/try=> (scag 10 (limo [1 2 3 4 ~]))
447+ > (scag 10 (limo [1 2 3 4 ~]))
430448 [i=1 t=[i=2 t=[i=3 t=[i=4 t=~]]]]
431449
432450
@@ -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,18 +471,20 @@ 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))
467− ~zod/try=> (skid (limo [0 1 2 3 ~]) a)
486+ > =a |=(a/@ (gth a 1))
487+ > (skid (limo [0 1 2 3 ~]) a)
468488 [p=[i=2 t=[i=3 t=~]] q=[i=0 t=[i=1 t=~]]]
469489
470490
@@ -481,27 +501,30 @@ 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))
504− ~zod/try=> (skim (limo [0 1 2 3 ~]) a)
526+ > =a |=(a/@ (gth a 1))
527+ > (skim (limo [0 1 2 3 ~]) a)
505528 [i=2 t=[i=3 t=~]]
506529
507530
@@ -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,17 +553,18 @@ 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))
543− ~zod/try=> (skip (limo [0 1 2 3 ~]) a)
566+ > =a |=(a/@ (gth a 1))
567+ > (skip (limo [0 1 2 3 ~]) a)
544568 [i=0 t=[i=1 t=~]]
545569
546570
@@ -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,18 +592,19 @@ 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
580− ~zod/try=> (slag 2 (limo [1 2 3 4 ~]))
605+ > (slag 2 (limo [1 2 3 4 ~]))
581606 [i=3 t=[i=4 t=~]]
582− ~zod/try=> (slag 1 (limo [1 2 3 4 ~]))
607+ > (slag 1 (limo [1 2 3 4 ~]))
583608 [i=2 t=[i=3 t=[i=4 t=~]]]
584609
585610
@@ -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,19 +632,20 @@ 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
620− ~zod/try=> (snag 2 "asdf")
646+ > (snag 2 "asdf")
621647 ~~d
622− ~zod/try=> (snag 0 `(list ,@ud)`~[1 2 3 4])
648+ > (snag 0 `(list ,@ud)`~[1 2 3 4])
623649 1
624650
625651
@@ -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,22 +672,23 @@ 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)))
664− ~zod/try=> (sort (limo [0 1 2 3 ~]) a)
690+ > =a =|({p=@ q=@} |.((gth p q)))
691+ > (sort (limo [0 1 2 3 ~]) a)
665692 ~[3 2 1 0]
666693
667694
@@ -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,15 +715,16 @@ 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--------
696724
697− ~zod/try=> (swag [2 5] "roly poly")
725+ > (swag [2 5] "roly poly")
698726 "ly po"
699− ~zod/try=> (swag [2 2] (limo [1 2 3 4 ~]))
727+ > (swag [2 2] (limo [1 2 3 4 ~]))
700728 [i=3 t=[i=4 t=~]]
701729
702730
@@ -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,18 +752,19 @@ 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
735− ~zod/try=> (turn (limo [104 111 111 110 ~]) ,@t)
764+ > (turn (limo [104 111 111 110 ~]) ,@t)
736765 <|h o o n|>
737− ~zod/try=> =a |=(a=@ (add a 4))
738− ~zod/try=> (turn (limo [1 2 3 4 ~]) a)
766+ > =a |=(a/@ (add a 4))
767+ > (turn (limo [1 2 3 4 ~]) a)
739768 ~[5 6 7 8]
740769
741770
@@ -745,30 +774,31 @@ 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
769− ~zod/try=> (weld "urb" "it")
799+ > (weld "urb" "it")
770800 ~[~~u ~~r ~~b ~~i ~~t]
771− ~zod/try=> (weld (limo [1 2 ~]) (limo [3 4 ~]))
801+ > (weld (limo [1 2 ~]) (limo [3 4 ~]))
772802 ~[1 2 3 4]
773803
774804
@@ -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,17 +835,18 @@ Source
805835 +<-(+ $(+<- +<->))
806836 --
807837
838+
808839Examples
809840--------
810841
811− ~zod/try=> (welp "foo" "bar")
842+ > (welp "foo" "bar")
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,12 +881,14 @@ Source
850881 (welp +<- $(+< +<+))
851882 --
852883
884+
885+
853886Examples
854887--------
855888
856− ~zod/try=> (zing (limo [(limo ['a' 'b' 'c' ~]) (limo ['e' 'f' 'g' ~]) (limo ['h' 'i' 'j' ~]) ~]))
889+ > (zing (limo [(limo ['a' 'b' 'c' ~]) (limo ['e' 'f' 'g' ~]) (limo ['h' 'i' 'j' ~]) ~]))
857890 ~['a' 'b' 'c' 'e' 'f' 'g' 'h' 'i' 'j']
858− ~zod/try=> (zing (limo [(limo [1 'a' 2 'b' ~]) (limo [3 'c' 4 'd' ~]) ~]))
891+ > (zing (limo [(limo [1 'a' 2 'b' ~]) (limo [3 'c' 4 'd' ~]) ~]))
859892 ~[1 97 2 98 3 99 4 100]
860893
861894
docs/system/hoon/library/2c.md+140−136
@@ -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)))
@@ -28,11 +28,11 @@ Source
2828Examples
2929--------
3030
31− ~zod/try=> (bex 4)
31+ > (bex 4)
3232 16
33− ~zod/try=> (bex (add 19 1))
33+ > (bex (add 19 1))
3434 1.048.576
35− ~zod/try=> (bex 0)
35+ > (bex 0)
3636 1
3737
3838
@@ -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)))
@@ -72,17 +72,17 @@ Source
7272Examples
7373--------
7474
75− ~zod/try=> `@ub`(can 3 ~[[1 1]])
75+ > `@ub`(can 3 ~[[1 1]])
7676 0b1
77− ~zod/try=> `@ub`(can 0 ~[[1 255]])
77+ > `@ub`(can 0 ~[[1 255]])
7878 0b1
79− ~zod/try=> `@ux`(can 3 [3 0xc1] [1 0xa] ~)
79+ > `@ux`(can 3 [3 0xc1] [1 0xa] ~)
8080 0xa00.00c1
81− ~zod/try=> `@ux`(can 3 [3 0xc1] [1 0xa] [1 0x23] ~)
81+ > `@ux`(can 3 [3 0xc1] [1 0xa] [1 0x23] ~)
8282 0x23.0a00.00c1
83− ~zod/try=> `@ux`(can 4 [3 0xc1] [1 0xa] [1 0x23] ~)
83+ > `@ux`(can 4 [3 0xc1] [1 0xa] [1 0x23] ~)
8484 0x23.000a.0000.0000.00c1
85− ~zod/try=> `@ux`(can 3 ~[[1 'a'] [2 'bc']])
85+ > `@ux`(can 3 ~[[1 'a'] [2 'bc']])
8686 0x63.6261
8787
8888
@@ -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,29 +113,30 @@ 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
122− ~zod/try=> `@ub`(cat 3 1 0)
123+ > `@ub`(cat 3 1 0)
123124 0b1
124− ~zod/try=> `@ub`(cat 0 1 1)
125+ > `@ub`(cat 0 1 1)
125126 0b11
126− ~zod/try=> `@ub`(cat 0 2 1)
127+ > `@ub`(cat 0 2 1)
127128 0b110
128− ~zod/try=> `@ub`(cat 2 1 1)
129+ > `@ub`(cat 2 1 1)
129130 0b1.0001
130− ~zod/try=> `@ub`256
131+ > `@ub`256
131132 0b1.0000.0000
132− ~zod/try=> `@ub`255
133+ > `@ub`255
133134 0b1111.1111
134− ~zod/try=> `@ub`(cat 3 256 255)
135+ > `@ub`(cat 3 256 255)
135136 0b1111.1111.0000.0001.0000.0000
136− ~zod/try=> `@ub`(cat 2 256 255)
137+ > `@ub`(cat 2 256 255)
137138 0b1111.1111.0001.0000.0000
138− ~zod/try=> (cat 3 256 255)
139+ > (cat 3 256 255)
139140 16.711.936
140141
141142
@@ -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,27 +167,27 @@ 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
173174--------
174175
175− ~zod/try=> (cut 0 [1 1] 2)
176+ > (cut 0 [1 1] 2)
176177 1
177− ~zod/try=> (cut 0 [2 1] 4)
178+ > (cut 0 [2 1] 4)
178179 1
179− ~zod/try=> `@t`(cut 3 [0 3] 'abcdefgh')
180+ > `@t`(cut 3 [0 3] 'abcdefgh')
180181 'abc'
181− ~zod/try=> `@t`(cut 3 [1 3] 'abcdefgh')
182+ > `@t`(cut 3 [1 3] 'abcdefgh')
182183 'bcd'
183− ~zod/try=> `@ub`(cut 0 [0 3] 0b1111.0000.1101)
184+ > `@ub`(cut 0 [0 3] 0b1111.0000.1101)
184185 0b101
185− ~zod/try=> `@ub`(cut 0 [0 6] 0b1111.0000.1101)
186+ > `@ub`(cut 0 [0 6] 0b1111.0000.1101)
186187 0b1101
187− ~zod/try=> `@ub`(cut 0 [4 6] 0b1111.0000.1101)
188+ > `@ub`(cut 0 [4 6] 0b1111.0000.1101)
188189 0b11.0000
189− ~zod/try=> `@ub`(cut 0 [3 6] 0b1111.0000.1101)
190+ > `@ub`(cut 0 [3 6] 0b1111.0000.1101)
190191 0b10.0001
191192
192193
@@ -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,27 +219,28 @@ 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
227− ~zod/try=> `@ub`12
229+ > `@ub`12
228230 0b1100
229− ~zod/try=> `@ub`(end 0 3 12)
231+ > `@ub`(end 0 3 12)
230232 0b100
231− ~zod/try=> (end 0 3 12)
233+ > (end 0 3 12)
232234 4
233− ~zod/try=> `@ub`(end 1 3 12)
235+ > `@ub`(end 1 3 12)
234236 0b1100
235− ~zod/try=> (end 1 3 12)
237+ > (end 1 3 12)
236238 12
237− ~zod/try=> `@ux`'abc'
239+ > `@ux`'abc'
238240 0x63.6261
239− ~zod/try=> `@ux`(end 3 2 'abc')
241+ > `@ux`(end 3 2 'abc')
240242 0x6261
241− ~zod/try=> `@t`(end 3 2 'abc')
243+ > `@t`(end 3 2 'abc')
242244 'ab'
243245
244246
@@ -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,16 +278,17 @@ Source
276278 (rsh a 1 d)
277279 $(d (add c (lsh a 1 d)), n +(n))
278280
281+
279282Examples
280283--------
281284
282− ~zod/try=> `@t`(fil 3 5 %a)
285+ > `@t`(fil 3 5 %a)
283286 'aaaaa'
284− ~zod/try=> `@t`(fil 5 10 %ceeb)
287+ > `@t`(fil 5 10 %ceeb)
285288 'ceebceebceebceebceebceebceebceebceebceeb'
286− ~zod/try=> `@t`(fil 4 10 %eced)
289+ > `@t`(fil 4 10 %eced)
287290 'ʇʇʇʇʇʇʇʇʇʇed'
288− ~zod/try=> `@tas`(fil 4 10 %bf)
291+ > `@tas`(fil 4 10 %bf)
289292 %bfbfbfbfbfbfbfbfbfbf
290293
291294
@@ -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,23 +319,24 @@ 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
325− ~zod/try=> `@ub`1
329+ > `@ub`1
326330 0b1
327− ~zod/try=> `@ub`(lsh 0 1 1)
331+ > `@ub`(lsh 0 1 1)
328332 0b10
329− ~zod/try=> (lsh 0 1 1)
333+ > (lsh 0 1 1)
330334 2
331− ~zod/try=> `@ub`255
335+ > `@ub`255
332336 0b1111.1111
333− ~zod/try=> `@ub`(lsh 3 1 255)
337+ > `@ub`(lsh 3 1 255)
334338 0b1111.1111.0000.0000
335− ~zod/try=> (lsh 3 1 255)
339+ > (lsh 3 1 255)
336340 65.280
337341
338342
@@ -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 |-
@@ -363,15 +367,15 @@ Source
363367Examples
364368--------
365369
366− ~zod/try=> (met 0 1)
370+ > (met 0 1)
367371 1
368− ~zod/try=> (met 0 2)
372+ > (met 0 2)
369373 2
370− ~zod/try=> (met 3 255)
374+ > (met 3 255)
371375 1
372− ~zod/try=> (met 3 256)
376+ > (met 3 256)
373377 2
374− ~zod/try=> (met 3 'abcde')
378+ > (met 3 'abcde')
375379 5
376380
377381
@@ -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))
@@ -408,13 +412,13 @@ Source
408412Examples
409413--------
410414
411− ~zod/try=> `@ub`(rap 2 (limo [1 2 3 4 ~]))
415+ > `@ub`(rap 2 (limo [1 2 3 4 ~]))
412416 0b100.0011.0010.0001
413− ~zod/try=> `@ub`(rap 1 (limo [1 2 3 4 ~]))
417+ > `@ub`(rap 1 (limo [1 2 3 4 ~]))
414418 0b1.0011.1001
415− ~zod/try=> (rap 0 (limo [0 0 0 ~]))
419+ > (rap 0 (limo [0 0 0 ~]))
416420 0
417− ~zod/try=> (rap 0 (limo [1 0 1 ~]))
421+ > (rap 0 (limo [1 0 1 ~]))
418422 3
419423
420424
@@ -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 |-
@@ -453,19 +457,19 @@ Source
453457Examples
454458--------
455459
456− ~zod/try=> `@ub`(rep 2 (limo [1 2 3 4 ~]))
460+ > `@ub`(rep 2 (limo [1 2 3 4 ~]))
457461 0b100.0011.0010.0001
458− ~zod/try=> (rep 0 (limo [0 0 1 ~]))
462+ > (rep 0 (limo [0 0 1 ~]))
459463 4
460− ~zod/try=> (rep 0 (limo [0 0 0 1 ~]))
464+ > (rep 0 (limo [0 0 0 1 ~]))
461465 8
462− ~zod/try=> (rep 0 (limo [0 1 0 0 ~]))
466+ > (rep 0 (limo [0 1 0 0 ~]))
463467 2
464− ~zod/try=> (rep 0 (limo [0 1 0 1 ~]))
468+ > (rep 0 (limo [0 1 0 1 ~]))
465469 10
466− ~zod/try=> (rep 0 (limo [0 1 0 1 0 1 ~]))
470+ > (rep 0 (limo [0 1 0 1 0 1 ~]))
467471 42
468− ~zod/try=> `@ub`42
472+ > `@ub`42
469473 0b10.1010
470474
471475
@@ -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,29 +498,29 @@ 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
502506Examples
503507--------
504508
505− ~zod/try=> `@ub`155
509+ > `@ub`155
506510 0b1001.1011
507− ~zod/try=> (rip 0 155)
511+ > (rip 0 155)
508512 ~[1 1 0 1 1 0 0 1]
509− ~zod/try=> (rip 2 155)
513+ > (rip 2 155)
510514 ~[11 9]
511− ~zod/try=> (rip 1 155)
515+ > (rip 1 155)
512516 ~[3 2 1 2]
513− ~zod/try=> `@ub`256
517+ > `@ub`256
514518 0b1.0000.0000
515− ~zod/try=> (rip 0 256)
519+ > (rip 0 256)
516520 ~[0 0 0 0 0 0 0 0 1]
517− ~zod/try=> (rip 2 256)
521+ > (rip 2 256)
518522 ~[0 0 1]
519− ~zod/try=> (rip 3 256)
523+ > (rip 3 256)
520524 ~[0 1]
521525
522526
@@ -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,33 +551,33 @@ 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
554558--------
555559
556− ~zod/try=> `@ub`145
560+ > `@ub`145
557561 0b1001.0001
558− ~zod/try=> `@ub`(rsh 1 1 145)
562+ > `@ub`(rsh 1 1 145)
559563 0b10.0100
560− ~zod/try=> (rsh 1 1 145)
564+ > (rsh 1 1 145)
561565 36
562− ~zod/try=> `@ub`(rsh 2 1 145)
566+ > `@ub`(rsh 2 1 145)
563567 0b1001
564− ~zod/try=> (rsh 2 1 145)
568+ > (rsh 2 1 145)
565569 9
566− ~zod/try=> `@ub`10
570+ > `@ub`10
567571 0b1010
568− ~zod/try=> `@ub`(rsh 0 1 10)
572+ > `@ub`(rsh 0 1 10)
569573 0b101
570− ~zod/try=> (rsh 0 1 10)
574+ > (rsh 0 1 10)
571575 5
572− ~zod/try=> `@ux`'abc'
576+ > `@ux`'abc'
573577 0x63.6261
574− ~zod/try=> `@t`(rsh 3 1 'abc')
578+ > `@t`(rsh 3 1 'abc')
575579 'bc'
576− ~zod/try=> `@ux`(rsh 3 1 'abc')
580+ > `@ux`(rsh 3 1 'abc')
577581 0x6362
578582
579583
@@ -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,20 +606,20 @@ 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--------
609613
610− ~zod/try=> `@ub`24
614+ > `@ub`24
611615 0b1.1000
612− ~zod/try=> (swap 0 24)
616+ > (swap 0 24)
613617 3
614− ~zod/try=> `@ub`3
618+ > `@ub`3
615619 0b11
616− ~zod/try=> (swap 0 0)
620+ > (swap 0 0)
617621 0
618− ~zod/try=> (swap 0 128)
622+ > (swap 0 128)
619623 1
620624
621625
@@ -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,25 +645,25 @@ Source
641645------
642646
643647 ++ xeb :: binary logarithm
644− :: ~/ %xeb
645− |= a=@
648+ ~/ %xeb
649+ |= a/@
646650 ^- @
647651 (met 0 a)
648652
649653Examples
650654--------
651655
652− ~zod/try=> (xeb 31)
656+ > (xeb 31)
653657 5
654− ~zod/try=> (xeb 32)
658+ > (xeb 32)
655659 6
656− ~zod/try=> (xeb 49)
660+ > (xeb 49)
657661 6
658− ~zod/try=> (xeb 0)
662+ > (xeb 0)
659663 0
660− ~zod/try=> (xeb 1)
664+ > (xeb 1)
661665 1
662− ~zod/try=> (xeb 2)
666+ > (xeb 2)
663667 2
664668
665669
docs/system/hoon/library/2d.md+42−41
@@ -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 ==
@@ -41,17 +41,17 @@ Source
4141Examples
4242--------
4343
44− ~zod/try=> (con 0b0 0b1)
44+ > (con 0b0 0b1)
4545 1
46− ~zod/try=> (con 0 1)
46+ > (con 0 1)
4747 1
48− ~zod/try=> (con 0 0)
48+ > (con 0 0)
4949 0
50− ~zod/try=> `@ub`(con 0b1111.0000 0b1.0011)
50+ > `@ub`(con 0b1111.0000 0b1.0011)
5151 0b1111.0011
52− ~zod/try=> (con 4 4)
52+ > (con 4 4)
5353 4
54− ~zod/try=> (con 10.000 234)
54+ > (con 10.000 234)
5555 10.234
5656
5757
@@ -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 ==
@@ -99,21 +99,21 @@ Source
9999Examples
100100--------
101101
102− ~zod/try=> `@ub`9
102+ > `@ub`9
103103 0b1001
104− ~zod/try=> `@ub`5
104+ > `@ub`5
105105 0b101
106− ~zod/try=> `@ub`(dis 9 5)
106+ > `@ub`(dis 9 5)
107107 0b1
108− ~zod/try=> (dis 9 5)
108+ > (dis 9 5)
109109 1
110− ~zod/try=> `@ub`534
110+ > `@ub`534
111111 0b10.0001.0110
112− ~zod/try=> `@ub`987
112+ > `@ub`987
113113 0b11.1101.1011
114− ~zod/try=> `@ub`(dis 534 987)
114+ > `@ub`(dis 534 987)
115115 0b10.0001.0010
116− ~zod/try=> (dis 534 987)
116+ > (dis 534 987)
117117 530
118118
119119
@@ -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 |-
@@ -157,17 +157,17 @@ Source
157157Examples
158158--------
159159
160− ~zod/try=> `@ub`2
160+ > `@ub`2
161161 0b10
162− ~zod/try=> `@ub`3
162+ > `@ub`3
163163 0b11
164− ~zod/try=> `@ub`(mix 2 3)
164+ > `@ub`(mix 2 3)
165165 0b1
166− ~zod/try=> (mix 2 3)
166+ > (mix 2 3)
167167 1
168− ~zod/try=> `@ub`(mix 2 2)
168+ > `@ub`(mix 2 2)
169169 0b0
170− ~zod/try=> (mix 2 2)
170+ > (mix 2 2)
171171 0
172172
173173
@@ -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,23 +197,24 @@ 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
206− ~zod/try=> `@ub`24
207+ > `@ub`24
207208 0b1.1000
208− ~zod/try=> (not 0 5 24)
209+ > (not 0 5 24)
209210 7
210− ~zod/try=> `@ub`7
211+ > `@ub`7
211212 0b111
212− ~zod/try=> (not 2 5 24)
213+ > (not 2 5 24)
213214 1.048.551
214− ~zod/try=> (not 2 5 1.048.551)
215+ > (not 2 5 1.048.551)
215216 24
216− ~zod/try=> (not 1 1 (not 1 1 10))
217+ > (not 1 1 (not 1 1 10))
217218 10
218219
219220
docs/system/hoon/library/2e.md+25−33
@@ -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,16 +19,16 @@ 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--------
2626
27− ~zod/try=> (fnv 10.000)
27+ > (fnv 10.000)
2828 272.465.456
29− ~zod/try=> (fnv 10.001)
29+ > (fnv 10.001)
3030 289.243.075
31− ~zod/try=> (fnv 1)
31+ > (fnv 1)
3232 16.777.619
3333
3434
@@ -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,18 +73,19 @@ Source
7373 ^$(b +(b))
7474 $(c (fnv (mix c (cut 3 [d 1] a))), d +(d))
7575
76+
7677Examples
7778--------
7879
79− ~zod/try=> (mug 10.000)
80+ > (mug 10.000)
8081 178.152.889
81− ~zod/try=> (mug 10.001)
82+ > (mug 10.001)
8283 714.838.017
83− ~zod/try=> (mug 1)
84+ > (mug 1)
8485 67.918.732
85− ~zod/try=> (mug (some 10))
86+ > (mug (some 10))
8687 1.872.403.737
87− ~zod/try=> (mug (limo [1 2 3 4 5 ~]))
88+ > (mug (limo [1 2 3 4 5 ~]))
8889 1.067.931.605
8990
9091
@@ -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,35 +128,26 @@ 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--------
149141
150− ~zod/try=> (mum 10.000)
142+ > (mum 10.000)
151143 1.232.632.901
152− ~zod/try=> (mum 10.001)
144+ > (mum 10.001)
153145 658.093.079
154− ~zod/try=> (mum 1)
146+ > (mum 1)
155147 818.387.364
156− ~zod/try=> (mum (some 10))
148+ > (mum (some 10))
157149 1.177.215.703
158− ~zod/try=> (mum ~[1 2 3 4 5])
150+ > (mum ~[1 2 3 4 5])
159151 1.517.902.092
160152
161153
docs/system/hoon/library/2f.md+51−45
@@ -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,24 +39,25 @@ Source
3939 $(a (rsh 3 1 a), b (rsh 3 1 b))
4040 (lth c d)
4141
42+
4243Examples
4344--------
4445
45− ~zod/try=> (aor 'a' 'b')
46+ > (aor 'a' 'b')
4647 %.y
47− ~zod/try=> (aor 'b' 'a')
48+ > (aor 'b' 'a')
4849 %.n
49− ~zod/try=> (aor "foo" "bar")
50+ > (aor "foo" "bar")
5051 %.n
51− ~zod/try=> (aor "bar" "foo")
52+ > (aor "bar" "foo")
5253 %.y
53− ~zod/try=> (aor "abcdefz" "abcdefa")
54+ > (aor "abcdefz" "abcdefa")
5455 %.n
55− ~zod/try=> (aor "abcdefa" "abcdefz")
56+ > (aor "abcdefa" "abcdefz")
5657 %.y
57− ~zod/try=> (aor 10.000 17.000)
58+ > (aor 10.000 17.000)
5859 %.y
59− ~zod/try=> (aor 10 9)
60+ > (aor 10 9)
6061 %.n
6162
6263
@@ -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,20 +98,21 @@ Source
9798 ?. ?=(@ b) &
9899 (lth a b)
99100
101+
100102Examples
101103--------
102104
103− ~zod/try=> (dor 1 2)
105+ > (dor 1 2)
104106 %.y
105− ~zod/try=> (dor 2 1)
107+ > (dor 2 1)
106108 %.n
107− ~zod/try=> (dor ~[1 2 3] ~[1 2 4])
109+ > (dor ~[1 2 3] ~[1 2 4])
108110 %.y
109− ~zod/try=> (dor ~[1 2 4] ~[1 2 3])
111+ > (dor ~[1 2 4] ~[1 2 3])
110112 %.n
111− ~zod/try=> (dor (limo ~[99 100 10.000]) ~[99 101 10.000])
113+ > (dor (limo ~[99 100 10.000]) ~[99 101 10.000])
112114 %.y
113− ~zod/try=> (dor ~[99 101 10.999] (limo ~[99 100 10.000]))
115+ > (dor ~[99 101 10.999] (limo ~[99 100 10.000]))
114116 %.n
115117
116118
@@ -125,50 +127,51 @@ 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
152− ~zod/try=> (gor 'd' 'c')
155+ > (gor 'd' 'c')
153156 %.y
154− ~zod/try=> 'd'
157+ > 'd'
155158 'd'
156− ~zod/try=> 'c'
157− ~zod/try=> `@ud`'d'
159+ > 'c'
160+ > `@ud`'d'
158161 100
159− ~zod/try=> `@ud`'c'
162+ > `@ud`'c'
160163 99
161− ~zod/try=> (mug 'd')
164+ > (mug 'd')
162165 1.628.185.714
163− ~zod/try=> (mug 'c')
166+ > (mug 'c')
164167 1.712.073.811
165− ~zod/try=> (gor 'd' 'c')
168+ > (gor 'd' 'c')
166169 %.y
167− ~zod/try=> (gor 'c' 'd')
170+ > (gor 'c' 'd')
168171 %.n
169− ~zod/try=> (gor "foo" "bar")
172+ > (gor "foo" "bar")
170173 %.n
171− ~zod/try=> (gor (some 10) (limo [1 2 3 ~]))
174+ > (gor (some 10) (limo [1 2 3 ~]))
172175 %.n
173176
174177
@@ -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,17 +212,19 @@ Source
209212 ?: =(-.a -.b)
210213 (gor +.a +.b)
211214 (gor -.a -.b)
215+ ::
216+
212217
213218Examples
214219--------
215220
216− ~zod/try=> (hor . 1)
221+ > (hor . 1)
217222 %.n
218− ~zod/try=> (hor 1 2)
223+ > (hor 1 2)
219224 %.y
220− ~zod/try=> (hor "abc" "cba")
225+ > (hor "abc" "cba")
221226 %.y
222− ~zod/try=> (hor 'c' 'd')
227+ > (hor 'c' 'd')
223228 %.n
224229
225230
@@ -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,21 +251,22 @@ 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
259− ~zod/try=> (vor 'f' 'g')
265+ > (vor 'f' 'g')
260266 %.y
261− ~zod/try=> (vor 'a' 'z')
267+ > (vor 'a' 'z')
262268 %.n
263− ~zod/try=> (vor 43.326 41.106)
269+ > (vor 43.326 41.106)
264270 %.n
265271
266272
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+106−97
@@ -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,12 +16,12 @@ Source
1616
1717 ++ in :: set engine
1818 ~/ %in
19− |/ a=(set)
19+ |_ a/(set)
2020
2121Examples
2222--------
2323
24− ~zod/try=> ~(. in (sa "asd"))
24+ > ~(. in (sa "asd"))
2525 <13.evb [nlr(^$1{@tD $1}) <414.fvk 101.jzo 1.ypj %164>]>
2626
2727### `+-all:in`
@@ -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+ > =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
62+ > (~(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+ > =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
65+ > (~(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+ > =b (sa `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
105+ > (~(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+ > =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
108+ > (~(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,13 +153,13 @@ Source
152153Examples
153154--------
154155
155− ~zod/try=> =b (sa `(list ,@t)`['a' 'b' 'c' ~])
156− ~zod/try=> (~(del in b) 'a')
156+ > =b (sa `(list @t)`['a' 'b' 'c' ~])
157+ > (~(del in b) 'a')
157158 {'c' 'b'}
158− ~zod/try=> =b (sa `(list ,@t)`['john' 'bonita' 'daniel' 'madeleine' ~])
159− ~zod/try=> (~(del in b) 'john')
159+ > =b (sa `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
160+ > (~(del in b) 'john')
160161 {'bonita' 'madeleine' 'daniel'}
161− ~zod/try=> (~(del in b) 'susan')
162+ > (~(del in b) 'susan')
162163 {'bonita' 'madeleine' 'daniel' 'john'}
163164
164165------------------------------------------------------------------------
@@ -172,43 +173,44 @@ 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 ~])
203− ~zod/try=> a
204+ > =a (sa `(list @)`[1 2 3 4 5 6 7 ~])
205+ > a
204206 {5 4 7 6 1 3 2}
205− ~zod/try=> -.a
207+ > -.a
206208 n=6
207− ~zod/try=> (~(dig in a) 7)
209+ > (~(dig in a) 7)
208210 [~ 12]
209− ~zod/try=> (~(dig in a) 2)
211+ > (~(dig in a) 2)
210212 [~ 14]
211− ~zod/try=> (~(dig in a) 6)
213+ > (~(dig in a) 6)
212214 [~ 2]
213215
214216------------------------------------------------------------------------
@@ -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,22 +238,22 @@ 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
247249Examples
248250--------
249251
250− ~zod/try=> b
252+ > b
251253 {'bonita' 'madeleine' 'rudolf' 'john'}
252− ~zod/try=> (~(gas in b) `(list ,@t)`['14' 'things' 'number' '1.337' ~])
254+ > (~(gas in b) `(list @t)`['14' 'things' 'number' '1.337' ~])
253255 {'1.337' '14' 'number' 'things' 'bonita' 'madeleine' 'rudolf' 'john'}
254− ~zod/try=> (~(gas in s) `(list ,@t)`['1' '2' '3' ~])
256+ > (~(gas in s) `(list ,@t)`['1' '2' '3' ~])
255257 {'1' '3' '2' 'e' 'd' 'a' 'c' 'b'}
256258
257259------------------------------------------------------------------------
@@ -279,7 +281,7 @@ Source
279281
280282 +- has :: b exists in a check
281283 ~/ %has
282− |* b=*
284+ |* b/*
283285 |- ^- ?
284286 ?~ a
285287 |
@@ -294,10 +296,10 @@ Source
294296Examples
295297--------
296298
297− ~zod/try=> =a (~(gas in `(set ,@t)`~) `(list ,@t)`[`a` `b` `c` ~])
298− ~zod/try=> (~(has in a) `a`)
299+ > =a (~(gas in `(set @t)`~) `(list @t)`[`a` `b` `c` ~])
300+ > (~(has in a) `a`)
299301 %.y
300− ~zod/try=> (~(has in a) 'z')
302+ > (~(has in a) 'z')
301303 %.n
302304
303305------------------------------------------------------------------------
@@ -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,20 +339,22 @@ 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
345349--------
346350
347− ~zod/try=> (~(int in (sa "ac")) (sa "ha"))
351+ > (~(int in (sa "ac")) (sa "ha"))
348352 {~~a}
349− ~zod/try=> (~(int in (sa "acmo")) ~)
353+ > (~(int in (sa "acmo")) ~)
350354 {}
351− ~zod/try=> (~(int in (sa "acmo")) (sa "ham"))
355+ > (~(int in (sa "acmo")) (sa "ham"))
352356 {~~a ~~m}
353− ~zod/try=> (~(int in (sa "acmo")) (sa "lep"))
357+ > (~(int in (sa "acmo")) (sa "lep"))
354358 {}
355359
356360------------------------------------------------------------------------
@@ -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,11 +405,11 @@ Source
401405Examples
402406--------
403407
404− ~zod/try=> =a (~(gas in `(set ,@t)`~) `(list ,@t)`[`a` `b` `c` ~])
405− ~zod/try=> =b (~(put in a) `d`)
406− ~zod/try=> b
408+ > =a (~(gas in `(set @t)`~) `(list @t)`[`a` `b` `c` ~])
409+ > =b (~(put in a) `d`)
410+ > b
407411 {`d` `a` `c` `b`}
408− ~zod/try=> -.l.+.b
412+ > -.l.+.b
409413 n=`d`
410414
411415------------------------------------------------------------------------
@@ -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 ~])
448− ~zod/try=> a
451+ > =a (~(gas in *(set @)) [1 2 3 ~])
452+ > a
449453 {1 3 2}
450− ~zod/try=> (~(rep in a) 0 |=([a=@ b=@] (add a b)))
454+ > (~(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,25 +475,26 @@ 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' ~])
488− ~zod/try=> s
492+ > =s (sa `(list @t)`['a' 'b' 'c' 'd' 'e' ~])
493+ > s
489494 {'e' 'd' 'a' 'c' 'b'}
490− ~zod/try=> (~(tap in s) `(list ,@t)`['1' '2' '3' ~])
495+ > (~(tap in s) `(list @t)`['1' '2' '3' ~])
491496 ~['b' 'c' 'a' 'd' 'e' '1' '2' '3']
492− ~zod/try=> b
497+ > b
493498 {'bonita' 'madeleine' 'daniel' 'john'}
494499 ~zod/try=> (~(tap in b) `(list ,@t)`['david' 'people' ~])
495500 ~['john' 'daniel' 'madeleine' 'bonita' 'david' 'people']
@@ -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,18 +543,19 @@ 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
543550--------
544551
545− ~zod/try=> (~(uni in (sa "ac")) (sa "ha"))
552+ > (~(uni in (sa "ac")) (sa "ha"))
546553 {~~a ~~c ~~h}
547− ~zod/try=> (~(uni in (sa "acmo")) ~)
554+ > (~(uni in (sa "acmo")) ~)
548555 {~~a ~~c ~~m ~~o}
549− ~zod/try=> (~(uni in (sa "acmo")) (sa "ham"))
556+ > (~(uni in (sa "acmo")) (sa "ham"))
550557 {~~a ~~c ~~m ~~o ~~h}
551− ~zod/try=> (~(uni in (sa "acmo")) (sa "lep"))
558+ > (~(uni in (sa "acmo")) (sa "lep"))
552559 {~~e ~~a ~~c ~~m ~~l ~~o ~~p}
553560
554561------------------------------------------------------------------------
@@ -575,17 +582,19 @@ Source
575582 +- wyt :: size of set
576583 |- ^- @
577584 ?~(a 0 +((add $(a l.a) $(a r.a))))
585+ --
586+
578587
579588
580589Examples
581590--------
582591
583− ~zod/try=> =a (~(put in (~(put in (sa)) 'a')) 'b')
584− ~zod/try=> ~(wyt in a)
592+ > =a (~(put in (~(put in (sa)) 'a')) 'b')
593+ > ~(wyt in a)
585594 2
586− ~zod/try=> b
595+ > b
587596 {'bonita' 'madeleine' 'daniel' 'john'}
588− ~zod/try=> ~(wyt in b)
597+ > ~(wyt in b)
589598 4
590599
591600
docs/system/hoon/library/2i.md+150−138
@@ -5,14 +5,15 @@ 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
15− ~zod/try=> ~(. by (mo (limo [%a 1] [%b 2] ~)))
16+ > ~(. by (mo (limo [%a 1] [%b 2] ~)))
1617 <19.irb [nlr([p={%a %b} q=@ud]) <414.rvm 101.jzo 1.ypj %164>]>
1718
1819------------------------------------------------------------------------
@@ -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+ > =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
43+ > (~(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+ > =a (mo `(list {@t @u})`[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
46+ > (~(all by a) |=(a/@ (lte a 6)))
4447 %.y
45− ~zod/try=> (~(all by a) |=(a=@ (lte a 4)))
48+ > (~(all by a) |=(a/@ (lte a 4)))
4649 %.n
4750
4851------------------------------------------------------------------------
@@ -62,15 +65,15 @@ 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+ > =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
73+ > (~(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] ~])
73− ~zod/try=> (~(any by a) |=(a=@ (lte a 4)))
75+ > =a (mo `(list {@t @u})`[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
76+ > (~(any by a) |=(a=@ (lte a 4)))
7477 %.y
7578
7679------------------------------------------------------------------------
@@ -81,7 +84,7 @@ Delete
8184
8285 +- del :: delete at key b
8386 ~/ %del
84− |* b=*
87+ |* b/*
8588 |- ^+ a
8689 ?~ a
8790 ~
@@ -89,21 +92,22 @@ 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]] ~])
106− ~zod/try=> (~(del by b) `a`)
109+ > =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
110+ > (~(del by b) `a`)
107111 {[p=`b` q=[2 3]]}
108112
109113------------------------------------------------------------------------
@@ -112,24 +116,26 @@ 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]] ~])
132− ~zod/try=> (~(dig by b) `b`)
137+ > =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
138+ > (~(dig by b) `b`)
133139 [~ 2]
134140
135141------------------------------------------------------------------------
@@ -140,22 +146,23 @@ 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] ~]
158− ~zod/try=> (~(gas by a) b)
163+ > =a (mo `(list {@t *})`[[`a` 1] [`b` 2] ~])
164+ > =b `(list {@t *})`[[`c` 3] [`d` 4] ~]
165+ > (~(gas by a) b)
159166 {[p=`d` q=4] [p=`a` q=1] [p=`c` q=3] [p=`b` q=2]}
160167
161168------------------------------------------------------------------------
@@ -178,12 +185,12 @@ 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]] ~])
186− ~zod/try=> (~(get by b) `b`)
192+ > =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
193+ > (~(get by b) `b`)
187194 [~ [2 3]]
188195
189196------------------------------------------------------------------------
@@ -193,25 +200,24 @@ 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] ~])
208− ~zod/try=> m
213+ > =m (mo `(list {@t *})`[['a' 1] ['b' 2] ~])
214+ > m
209215 {[p='a' q=1] [p='b' q=2]}
210− ~zod/try=> (~(get by m) 'a')
216+ > (~(get by m) 'a')
211217 [~ 1]
212− ~zod/try=> (~(got by m) 'a')
218+ > (~(got by m) 'a')
213219 1
214− ~zod/try=> (~(got by m) 'c')
220+ > (~(got by m) 'c')
215221 ! exit
216222
217223------------------------------------------------------------------------
@@ -222,20 +228,21 @@ 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]] ~])
236− ~zod/try=> (~(has by b) `b`)
242+ > =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
243+ > (~(has by b) `b`)
237244 %.y
238− ~zod/try=> (~(has by b) `c`)
245+ > (~(has by b) `c`)
239246 %.n
240247
241248------------------------------------------------------------------------
@@ -246,7 +253,7 @@ Intersection
246253
247254 +- int :: intersection
248255 ~/ %int
249− |* b=_a
256+ |* b/_a
250257 |- ^+ a
251258 ?~ b
252259 ~
@@ -255,42 +262,43 @@ 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] ~])
276− ~zod/try=> n
283+ > =n (mo `(list {@t *})`[['a' 1] ['c' 3] ~])
284+ > n
277285 {[p='a' q=1] [p='c' q=3]}
278− ~zod/try=> m
286+ > m
279287 {[p='a' q=1] [p='b' q=2]}
280− ~zod/try=> (~(int by m) n)
288+ > (~(int by m) n)
281289 {[p='a' q=1]}
282− ~ravpel-holber/try=> =p (mo `(list ,[@t *])`[['a' 2] ['b' 2] ~])
283− ~zod/try=> p
290+ ~ravpel-holber/try=> =p (mo `(list {@t *})`[['a' 2] ['b' 2] ~])
291+ > p
284292 {[p='a' q=2] [p='b' q=2]}
285− ~zod/try=> (~(int by p) n)
293+ > (~(int by p) n)
286294 {[p='a' q=2]}
287− ~zod/try=> =q (mo `(list ,[@t *])`[['a' 2] ['c' 2] ~])
288− ~zod/try=> q
295+ > =q (mo `(list {@t *})`[['a' 2] ['c' 2] ~])
296+ > q
289297 {[p='a' q=2] [p='b' q=2]}
290− ~zod/try=> (~(int by p) q)
298+ > (~(int by p) q)
291299 {[p='a' q=2] [p='b' q=2]}
292− ~zod/try=> =o (mo `(list ,[@t *])`[['c' 3] ['d' 4] ~])
293− ~zod/try=> (~(int by m) o)
300+ > =o (mo `(list {@t *})`[['c' 3] ['d' 4] ~])
301+ > (~(int by m) o)
294302 {}
295303
296304
@@ -315,17 +323,17 @@ pair in the map. If the value is null, delete the key.
315323
316324XX This arm is broken, asana task 15186618346453
317325
318− ~zod/try=> m
326+ > m
319327 {[p='a' q=1] [p='b' q=2]}
320− ~zod/try=> (~(mar by m) 'c' (some 3))
328+ > (~(mar by m) 'c' (some 3))
321329 ! -find-limb.n
322330 ! find-none
323331 ! exit
324− ~zod/try=> (~(mar by m) 'c' ~)
332+ > (~(mar by m) 'c' ~)
325333 ! -find-limb.n
326334 ! find-none
327335 ! exit
328− ~zod/try=> (~(mar by m) 'b' ~)
336+ > (~(mar by m) 'b' ~)
329337 ! -find-limb.n
330338 ! find-none
331339 ! exit
@@ -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,23 +365,24 @@ 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
367376`c` is a value of the same type of the values in `a`.
368377
369− ~zod/try=> m
378+ > m
370379 {[p='a' q=1] [p='b' q=2]}
371− ~zod/try=> (~(put by m) 'c' 3)
380+ > (~(put by m) 'c' 3)
372381 {[p='a' q=1] [p='c' q=3] [p='b' q=2]}
373− ~zod/try=> (~(put by m) "zod" 26)
382+ > (~(put by m) "zod" 26)
374383 ! type-fail
375384 ! exit
376− ~zod/try=> (~(put by m) 'a' 2)
385+ > (~(put by m) 'a' 2)
377386 {[p='a' q=2] [p='b' q=2]}
378387
379388------------------------------------------------------------------------
@@ -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
429− ~zod/try=> m
440+ > m
430441 {[p='a' q=1] [p='b' q=2]}
431− ~zod/try=> ^+(m (~(run by m) dec))
442+ > ^+(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+ > `(map @tas @t)`(~(run by m) (cury scot %ux))
434445 {[p=%a q='0x1'] [p=%b q='0x2']}
435446
436447------------------------------------------------------------------------
@@ -441,25 +452,26 @@ 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]}
458− ~zod/try=> `*`m
470+ > `*`m
459471 [[98 2] [[97 1] 0 0] 0]
460− ~zod/try=> (~(tap by m))
472+ > (~(tap by m))
461473 ~[[p='b' q=2] [p='a' q=1]]
462− ~zod/try=> `*`(~(tap by m))
474+ > `*`(~(tap by m))
463475 [[98 2] [97 1] 0]
464476
465477------------------------------------------------------------------------
@@ -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,38 +491,38 @@ 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
498− ~zod/try=> m
510+ > m
499511 {[p='a' q=1] [p='b' q=2]}
500− ~zod/try=> o
512+ > o
501513 {[p='d' q=4] [p='c' q=3]}
502− ~zod/try=> (~(uni by m) o)
514+ > (~(uni by m) o)
503515 {[p='d' q=4] [p='a' q=1] [p='c' q=3] [p='b' q=2]}
504− ~zod/try=> (~(uni by m) ~)
516+ > (~(uni by m) ~)
505517 {[p='a' q=1] [p='b' q=2]}
506− ~zod/try=> n
518+ > n
507519 {[p='a' q=1] [p='c' q=9]}
508− ~zod/try=> (~(uni by o) n)
520+ > (~(uni by o) n)
509521 {[p='d' q=4] [p='a' q=1] [p='c' q=3]}
510− ~zod/try=> =n (mo `(list ,[@t *])`[['a' 1] ['c' 9] ~])
511− ~zod/try=> n
522+ > =n (mo `(list ,[@t *])`[['a' 1] ['c' 9] ~])
523+ > n
512524 {[p='a' q=1] [p='c' q=9]}
513− ~zod/try=> (~(uni by o) n)
525+ > (~(uni by o) n)
514526 {[p='d' q=4] [p='a' q=1] [p='c' q=9]}
515527
516528------------------------------------------------------------------------
@@ -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,18 +540,18 @@ 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
536− ~zod/try=> m
548+ > m
537549 {[p='a' q=1] [p='b' q=2]}
538− ~zod/try=> (~(urn by m) |=(a=[p=* q=*] q.a))
550+ > (~(urn by m) |=(a=[p=* q=*] q.a))
539551 {[p='a' q=1] [p='b' q=2]}
540− ~zod/try=> (~(urn by m) |=(a=[p=* q=*] 7))
552+ > (~(urn by m) |=(a=[p=* q=*] 7))
541553 {[p='a' q=7] [p='b' q=7]}
542− ~zod/try=> (~(urn by m) |=(a=[p=* q=*] p.a))
554+ > (~(urn by m) |=(a=[p=* q=*] p.a))
543555 {[p='a' q=97] [p='b' q=98]}
544556
545557------------------------------------------------------------------------
@@ -554,17 +566,17 @@ Depth
554566
555567Produce the depth of the tree map `a`.
556568
557−`a` is a [map]().
569+`a` is a map.
558570
559− ~zod/try=> m
571+ > m
560572 {[p='a' q=1] [p='b' q=2]}
561− ~zod/try=> o
573+ > o
562574 {[p='d' q=4] [p='c' q=3]}
563− ~zod/try=> ~(wyt by m)
575+ > ~(wyt by m)
564576 2
565− ~zod/try=> ~(wyt by o)
577+ > ~(wyt by o)
566578 2
567− ~zod/try=> ~(wyt by (~(uni by m) o))
579+ > ~(wyt by (~(uni by m) o))
568580 4
569581
570582
docs/system/hoon/library/2j.md+65−215
@@ -3,15 +3,14 @@
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
14− ~zod/try=> ~(. ja (mo (limo a/"ho" b/"he" ~)))
13+ > ~(. ja (mo (limo a/"ho" b/"he" ~)))
1514 <2.dgz [nlr([p={%a %b} q=""]) <414.fvk 101.jzo 1.ypj %164>]>
1615
1716------------------------------------------------------------------------
@@ -20,25 +19,26 @@ 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
34− ~zod/try=> =l (mo `(list ,[@t (list ,@)])`[['a' `(list ,@)`[1 2 3 ~]] ['b' `(list ,@)`[4 5 6 ~]] ~])
35− ~zod/try=> l
34+ > =l (mo `(list ,[@t (list ,@)])`[['a' `(list ,@)`[1 2 3 ~]] ['b' `(list ,@)`[4 5 6 ~]] ~])
35+ > l
3636 {[p='a' q=~[1 2 3]] [p='b' q=~[4 5 6]]}
37− ~zod/try=> (~(get ja l) 'a')
37+ > (~(get ja l) 'a')
3838 ~[1 2 3]
39− ~zod/try=> (~(get ja l) 'b')
39+ > (~(get ja l) 'b')
4040 ~[4 5 6]
41− ~zod/try=> (~(get ja l) 'c')
41+ > (~(get ja l) 'c')
4242 ~
4343
4444------------------------------------------------------------------------
@@ -48,230 +48,77 @@ 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
6262`c` is a value of the same type as the values in `a`.
6363
64− ~zod/try=> =l (mo `(list ,[@t (list ,@)])`[['a' `(list ,@)`[1 2 3 ~]] ['b' `(list ,@)`[4 5 6 ~]] ~])
65− ~zod/try=> l
64+ > =l (mo `(list ,[@t (list ,@)])`[['a' `(list ,@)`[1 2 3 ~]] ['b' `(list ,@)`[4 5 6 ~]] ~])
65+ > l
6666 {[p='a' q=~[1 2 3]] [p='b' q=~[4 5 6]]}
67− ~zod/try=> (~(add ja l) 'b' 7)
67+ > (~(add ja l) 'b' 7)
6868 {[p='a' q=~[1 2 3]] [p='b' q=~[7 4 5 6]]}
69− ~zod/try=> (~(add ja l) 'a' 100)
69+ > (~(add ja l) 'a' 100)
7070 {[p='a' q=~[100 1 2 3]] [p='b' q=~[4 5 6]]}
71− ~zod/try=> (~(add ja l) 'c' 7)
71+ > (~(add ja l) 'c' 7)
7272 {[p='a' q=~[1 2 3]] [p='c' q=~[7]] [p='b' q=~[4 5 6]]}
73− ~zod/try=> (~(add ja l) 'c' `(list ,@)`[7 8 9 ~])
73+ > (~(add ja l) 'c' `(list ,@)`[7 8 9 ~])
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
91− ~zod/try=> ~(. ju (mo (limo a/(sa "ho") b/(sa "he") ~)))
90+ > ~(. 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>]>
9392
9493### `+-del:ju`
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
267114`c` is the value of the same type of the keys in `a` that is to be
268115removed.
269116
270− ~zod/try=> s
117+ > s
271118 {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
272− ~zod/try=> (~(del ju s) 'a' 1)
119+ > (~(del ju s) 'a' 1)
273120 {[p='a' q={3 2}] [p='b' q={5 4 6}]}
274− ~zod/try=> (~(del ju s) 'c' 7)
121+ > (~(del ju s) 'c' 7)
275122 {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
276123
277124------------------------------------------------------------------------
@@ -281,23 +128,24 @@ 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
294− ~zod/try=> s
142+ > s
295143 {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
296− ~zod/try=> (~(get ju s) 'a')
144+ > (~(get ju s) 'a')
297145 {1 3 2}
298− ~zod/try=> (~(get ju s) 'b')
146+ > (~(get ju s) 'b')
299147 {5 4 6}
300− ~zod/try=> (~(get ju s) 'c')
148+ > (~(get ju s) 'c')
301149 ~
302150
303151------------------------------------------------------------------------
@@ -307,32 +155,34 @@ 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
323− ~zod/try=> s
173+ > s
324174 {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
325− ~zod/try=> (~(has ju s) 'a' 3)
175+ > (~(has ju s) 'a' 3)
326176 %.y
327− ~zod/try=> (~(has ju s) 'b' 6)
177+ > (~(has ju s) 'b' 6)
328178 %.y
329− ~zod/try=> (~(has ju s) 'a' 7)
179+ > (~(has ju s) 'a' 7)
330180 %.n
331− ~zod/try=> (~(has jus s) 'c' 7)
181+ > (~(has jus s) 'c' 7)
332182 ! -find-limb.jus
333183 ! find-none
334184 ! exit
335− ~zod/try=> (~(has ju s) 'c' 7)
185+ > (~(has ju s) 'c' 7)
336186 %.n
337187
338188------------------------------------------------------------------------
@@ -341,27 +191,27 @@ 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
358− ~zod/try=> s
208+ > s
359209 {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
360− ~zod/try=> (~(put ju s) 'a' 7)
210+ > (~(put ju s) 'a' 7)
361211 {[p='a' q={7 1 3 2}] [p='b' q={5 4 6}]}
362− ~zod/try=> (~(put ju s) 'a' 1)
212+ > (~(put ju s) 'a' 1)
363213 {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
364− ~zod/try=> (~(put ju s) 'c' 7)
214+ > (~(put ju s) 'c' 7)
365215 {[p='a' q={1 3 2}] [p='c' q={7}] [p='b' q={5 4 6}]}
366216
367217
docs/system/hoon/library/2k.md+63−59
@@ -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,23 +39,24 @@ 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
52− ~zod/try=> `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
53+ > `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
5354 {"a" "b" "c" "d" "e" "f" "g"}
54− ~zod/try=> `*`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
55+ > `*`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
5556 [[97 0] 0 [98 0] 0 [99 0] 0 [100 0] 0 [101 0] 0 [102 0] 0 [103 0] 0 0]
56− ~zod/try=> ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
57+ > ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
5758 {"a" "b" "c" "d" "e" "f" "g"}
58− ~zod/try=> `*`~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
59+ > `*`~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
5960 [[100 0] [[99 0] [[98 0] [[97 0] 0 0] 0] 0] [101 0] 0 [102 0] 0 [103 0] 0 0]
6061
6162------------------------------------------------------------------------
@@ -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,21 +86,22 @@ 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 ~])
92− ~zod/try=> ~(dep to a)
93+ > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 7 ~])
94+ > ~(dep to a)
9395 4
94− ~zod/try=> =a (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 4 ~])
95− ~zod/try=> ~(dep to a)
96+ > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 ~])
97+ > ~(dep to a)
9698 3
97− ~zod/try=> =a (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 ~])
98− ~zod/try=> ~(dep to a)
99+ > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 ~])
100+ > ~(dep to a)
99101 2
100− ~zod/try=> ~(dep to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
102+ > ~(dep to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
101103 7
102− ~zod/try=> ~(dep to ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]))
104+ > ~(dep to ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]))
103105 4
104106
105107------------------------------------------------------------------------
@@ -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-------
@@ -134,11 +136,11 @@ Source
134136Examples
135137--------
136138
137− ~zod/try=> (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 ~])
139+ > (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 ~])
138140 {3 2 1}
139− ~zod/try=> =a (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 ~])
140− ~zod/try=> =b `(list ,@)`[4 5 6 ~]
141− ~zod/try=> (~(gas to a) b)
141+ > =a (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 ~])
142+ > =b `(list ,@)`[4 5 6 ~]
143+ > (~(gas to a) b)
142144 {6 5 4 3 2 1}
143145
144146------------------------------------------------------------------------
@@ -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,10 +180,10 @@ Source
178180Examples
179181--------
180182
181− ~zod/try=> =s (~(gas to *(qeu ,@)) `(list ,@)`~[1 2 3])
182− ~zod/try=> ~(get to s)
183+ > =s (~(gas to *(qeu @)) `(list @)`~[1 2 3])
184+ > ~(get to s)
183185 [p=1 q={3 2}]
184− ~zod/try=> ~(get to ~)
186+ > ~(get to ~)
185187 ! exit
186188
187189------------------------------------------------------------------------
@@ -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,22 +210,22 @@ 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 ~])
219− ~zod/try=> -.a
220+ > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
221+ > -.a
220222 n=6
221− ~zod/try=> =b ~(nap to a)
222− ~zod/try=> -.b
223+ > =b ~(nap to a)
224+ > -.b
223225 n=2
224− ~zod/try=> b
226+ > b
225227 {5 4 3 2 1}
226− ~zod/try=> a
228+ > a
227229 {6 5 4 3 2 1}
228230
229231------------------------------------------------------------------------
@@ -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,18 +253,19 @@ 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 ~])
265− ~zod/try=> (~(put to a) 7)
267+ > (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
268+ > (~(put to a) 7)
266269 {7 6 5 4 2 1 3}
267270
268271------------------------------------------------------------------------
@@ -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 ~])
296− ~zod/try=> `*`a
299+ > =a (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
300+ > `*`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+ > (~(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,15 +322,15 @@ 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 ~])
329− ~zod/try=> ~(top to a)
332+ > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
333+ > ~(top to a)
330334 [~ 1]
331335
332336
docs/system/hoon/library/2n.md+49−43
@@ -10,17 +10,18 @@ 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
18− ~zod/try=> (:(cork dec dec dec) 20)
19+ > (:(cork dec dec dec) 20)
1920 17
20− ~zod/try=> =mal (mo (limo a/15 b/23 ~))
21− ~zod/try=> ((cork ~(got by mal) dec) %a)
21+ > =mal (mo (limo a+15 b+23 ~))
22+ > ((cork ~(got by mal) dec) %a)
2223 14
23− ~zod/try=> ((cork ~(got by mal) dec) %b)
24+ > ((cork ~(got by mal) dec) %b)
2425 22
2526
2627
@@ -40,14 +41,16 @@ 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--------
4952
50− ~zod/try=> ((corl (lift bex) (slat %ud)) '2')
53+ > ((corl (lift bex) (slat %ud)) '2')
5154 [~ 4]
5255
5356
@@ -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,18 +76,19 @@ 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--------
8387
84− ~zod/try=> =tep (curr scan sym)
85− ~zod/try=> `@t`(tep "asd")
88+ > =tep (curr scan sym)
89+ > `@t`(tep "asd")
8690 'asd'
87− ~zod/try=> `@t`(tep "lek-om")
91+ > `@t`(tep "lek-om")
8892 'lek-om'
8993
9094
@@ -97,30 +101,32 @@ 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--------
119125
120− ~zod/try=> =mol (cury add 2)
121− ~zod/try=> (mol 4)
126+ > =mol (cury add 2)
127+ > (mol 4)
122128 6
123− ~zod/try=> (mol 7)
129+ > (mol 7)
124130 9
125131
126132
@@ -134,23 +140,22 @@ 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
147− ~zod/try=> ((hard (list)) (limo [1 2 3 ~]))
152+ > ((hard (list)) (limo [1 2 3 ~]))
148153 ~[1 2 3]
149− ~zod/try=> ((hard ,@) (add 2 2))
154+ > ((hard @) (add 2 2))
150155 4
151− ~zod/try=> ((hard ,@t) (crip "Tape to cord, bro!"))
156+ > ((hard @t) (crip "Tape to cord, bro!"))
152157 'Tape to cord, bro'
153− ~zod/try=> ((hard tape) (crip "...Tape to cord, bro?..."))
158+ > ((hard tape) (crip "...Tape to cord, bro?..."))
154159 ! hard
155160 ! exit
156161
@@ -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+ > ((soft %4) (add 2 2))
178184 [~ %4]
179− ~zod/try=> ((soft ,@) (add 2 2))
185+ > ((soft @) (add 2 2))
180186 [~ 4]
181− ~zod/try=> ((soft ,%5) (add 2 2))
187+ > ((soft %5) (add 2 2))
182188 ~
183− ~zod/try=> ((soft ,@t) (crip "Tape to cord, Woohoo!"))
189+ > ((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+ > ((soft @t) (trip 'Cmon man... Tape to cord? Please?!'))
186192 ~
187193
188194
docs/system/hoon/library/2o.md+48−46
@@ -2,30 +2,31 @@
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
17− ~zod/try=> =a (limo [1 2 ~])
18− ~zod/try=> a
18+ > =a (limo [1 2 ~])
19+ > a
1920 [i=1 t=[i=2 t=~]]
20− ~zod/try=> =b (limo [3 4 ~])
21− ~zod/try=> b
21+ > =b (limo [3 4 ~])
22+ > b
2223 [i=3 t=[i=4 t=~]]
23− ~zod/try=> =c (mo (limo [[%a a] [%b b] ~]))
24− ~zod/try=> c
24+ > =c (mo (limo [[%a a] [%b b] ~]))
25+ > c
2526 {[p=%a q=[i=1 t=[i=2 t=~]]] [p=%b q=[i=3 t=[i=4 t=~]]]}
26− ~zod/try=> (~(get ja c) %a)
27+ > (~(get ja c) %a)
2728 [i=1 t=[i=2 t=~]]
28− ~zod/try=> (~(get ja c) %c)
29+ > (~(get ja c) %c)
2930 ~
3031
3132
@@ -33,30 +34,31 @@ 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--------
4547
4648See also: `++ju`, `++by`, `++map`, `++set`
4749
48− ~zod/try=> =a (sa (limo [1 2 ~]))
49− ~zod/try=> a
50+ > =a (sa (limo [1 2 ~]))
51+ > a
5052 {1 2}
51− ~zod/try=> =b (sa (limo [3 4 ~]))
52− ~zod/try=> b
53+ > =b (sa (limo [3 4 ~]))
54+ > b
5355 {4 3}
54− ~zod/try=> =c (mo (limo [[%a a] [%b b] ~]))
55− ~zod/try=> c
56+ > =c (mo (limo [[%a a] [%b b] ~]))
57+ > c
5658 {[p=%a q={1 2}] [p=%b q={4 3}]}
57− ~zod/try=> (~(get ju c) %b)
59+ > (~(get ju c) %b)
5860 {4 3}
59− ~zod/try=> (~(put ju c) [%b 5])
61+ > (~(put ju c) [%b 5])
6062 {[p=%a q={1 2}] [p=%b q={5 4 3}]}
6163
6264
@@ -65,50 +67,50 @@ 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+ >? *(map @t @u)
87+ nlr({p/@t q/@u})
88+ {}
89+ > (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--------
108110
109− ~zod/try=> (qeu time)
111+ > (qeu time)
110112 <1.qyo [* <1.sxx [a=<1.ebd [* <101.jzo 1.ypj %164>]> <101.jzo 1.ypj %164>]>]>
111− ~zod/try=> (~(gas to *(qeu time)) [~2014.1.1 ~2014.1.2 ~])
113+ > (~(gas to *(qeu time)) [~2014.1.1 ~2014.1.2 ~])
112114 {~2014.1.2 ~2014.1.1}
113115
114116
@@ -118,25 +120,25 @@ 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
135− ~zod/try=> (sa "abc")
137+ > (sa "abc")
136138 {~~a ~~c ~~b}
137− ~zod/try=> (~(put in (sa "abc")) %d)
139+ > (~(put in (sa "abc")) %d)
138140 {~~d ~~a ~~c ~~b}
139− ~zod/try=> (~(put in (sa "abc")) %a)
141+ > (~(put in (sa "abc")) %a)
140142 {~~a ~~c ~~b}
141143
142144
docs/system/hoon/library/2p.md+35−34
@@ -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)]
@@ -43,13 +43,13 @@ Source
4343Examples
4444--------
4545
46− ~zod/try=> (cue 12)
46+ > (cue 12)
4747 1
48− ~zod/try=> (cue 817)
48+ > (cue 817)
4949 [1 1]
50− ~zod/try=> (cue 4.657)
50+ > (cue 4.657)
5151 [1 2]
52− ~zod/try=> (cue 39.689)
52+ > (cue 39.689)
5353 [0 19]
5454
5555
@@ -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))
@@ -102,13 +102,13 @@ Source
102102Examples
103103--------
104104
105− ~zod/try=> (jam 1)
105+ > (jam 1)
106106 12
107− ~zod/try=> (jam [1 1])
107+ > (jam [1 1])
108108 817
109− ~zod/try=> (jam [1 2])
109+ > (jam [1 2])
110110 4.657
111− ~zod/try=> (jam [~ u=19])
111+ > (jam [~ u=19])
112112 39.689
113113
114114
@@ -135,36 +135,37 @@ 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
151152--------
152153
153− ~zod/try=> (mat 0xaaa)
154+ > (mat 0xaaa)
154155 [p=20 q=699.024]
155− ~zod/try=> (met 0 q:(mat 0xaaa))
156+ > (met 0 q:(mat 0xaaa))
156157 20
157− ~zod/try=> `@ub`q:(mat 0xaaa)
158+ > `@ub`q:(mat 0xaaa)
158159 0b1010.1010.1010.1001.0000
159− ~zod/try=> =a =-(~&(- -) `@ub`0xaaa)
160+ > =a =-(~&(- -) `@ub`0xaaa)
160161 0b1010.1010.1010
161− ~zod/try=> =b =-(~&(- -) `@ub`(xeb a))
162+ > =b =-(~&(- -) `@ub`(xeb a))
162163 0b1100
163− ~zod/try=> =b =-(~&(- -) `@ub`(met 0 a))
164+ > =b =-(~&(- -) `@ub`(met 0 a))
164165 0b1100
165− ~zod/try=> =c =-(~&(- -) (xeb b))
166+ > =c =-(~&(- -) (xeb b))
166167 4
167− ~zod/try=> [`@ub`a `@ub`(end 0 (dec c) b) `@ub`(bex c)]
168+ > [`@ub`a `@ub`(end 0 (dec c) b) `@ub`(bex c)]
168169 [0b1010.1010.1010 0b100 0b1.0000]
169170
170171
@@ -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)
@@ -214,11 +215,11 @@ Source
214215Examples
215216--------
216217
217− ~zod/try=> `@ub`(jam 0xaaa)
218+ > `@ub`(jam 0xaaa)
218219 0b1.0101.0101.0101.0010.0000
219− ~zod/try=> (rub 1 0b1.0101.0101.0101.0010.0000)
220+ > (rub 1 0b1.0101.0101.0101.0010.0000)
220221 [p=20 q=2.730]
221− ~zod/try=> `@ux`q:(rub 1 0b1.0101.0101.0101.0010.0000)
222+ > `@ux`q:(rub 1 0b1.0101.0101.0101.0010.0000)
222223 0xaaa
223224
224225***
docs/system/hoon/library/2q.md+53−78
@@ -3,19 +3,19 @@
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--------
1717
18− ~zod/try=> *char
18+ > *char
1919 ''
2020 ~zod/try> (char 97)
2121 'a'
@@ -27,27 +27,27 @@ 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
45− ~zod/try=> `@ux`'foobar'
45+ > `@ux`'foobar'
4646 0x7261.626f.6f66
4747
48− ~zod/try=> `@`'urbit'
48+ > `@`'urbit'
4949 499.984.265.845
50− ~zod/try=> (cord 499.984.265.845)
50+ > (cord 499.984.265.845)
5151 'urbit'
5252
5353
@@ -58,19 +58,20 @@ 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
73− ~zod/try=> `date`(yore ~2014.6.6..21.09.15..0a16)
74+ > `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]]]
7576
7677
@@ -96,28 +97,28 @@ 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--------
112113
113− ~zod/try=> >(bex 20) (bex 19)<
114+ > >(bex 20) (bex 19)<
114115 [%rose p=[p=" " q="[" r="]"] q=~[[%leaf p="1.048.576"] [%leaf p="524.288"]]]
115− ~zod/try=> (wash [0 80] >(bex 20) (bex 19)<) :: at 80 cols
116+ > (wash [0 80] >(bex 20) (bex 19)<) :: at 80 cols
116117 <<"[1.048.576 524.288]">>
117− ~zod/try=> (wash [0 15] >(bex 20) (bex 19)<) :: at 15 cols (two lines)
118+ > (wash [0 15] >(bex 20) (bex 19)<) :: at 15 cols (two lines)
118119 <<"[ 1.048.576" " 524.288" "]">>
119120
120− ~zod/try=> [(bex 150) (bex 151)] :: at 80 cols
121+ > [(bex 150) (bex 151)] :: at 80 cols
121122 [ 1.427.247.692.705.959.881.058.285.969.449.495.136.382.746.624
122123 2.854.495.385.411.919.762.116.571.938.898.990.272.765.493.248
123124 ]
@@ -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
@@ -141,9 +142,9 @@ Source
141142Examples
142143--------
143144
144− ~zod/try=> `(list ,char)`"foobar"
145+ > `(list ,char)`"foobar"
145146 "foobar"
146− ~zod/try=> `(list ,@)`"foobar"
147+ > `(list ,@)`"foobar"
147148 ~[102 111 111 98 97 114]
148149
149150
@@ -152,26 +153,26 @@ 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
168− ~zod/try=> -<-
169+ > -<-
169170 ~2014.9.20..00.43.33..b52a
170− ~zod/try=> :: the time is always in your context at -<-
171− ~zod/try=> (yell -<-)
171+ > :: the time is always in your context at -<-
172+ > (yell -<-)
172173 [d=106.751.991.820.278 h=0 m=43 s=39 f=~[0x54d1]]
173174
174− ~zod/try=> (yell ~d20)
175+ > (yell ~d20)
175176 [d=20 h=0 m=0 s=0 f=~]
176177
177178
@@ -183,25 +184,25 @@ 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--------
198199
199− ~zod/try=> *term
200+ > *term
200201 %$
201202
202− ~zod/try=> %dead-fish9
203+ > %dead-fish9
203204 %dead-fish9
204− ~zod/try=> -:!>(%dead-fish9)
205+ > -:!>(%dead-fish9)
205206 [%cube p=271.101.667.197.767.630.546.276 q=[%atom p=%tas]]
206207
207208
@@ -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
219− ~zod/try=> `wain`/som/del/rok
220+ > `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+ > `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+218−216
@@ -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,31 +32,31 @@ 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--------
8544
86− ~zod/try=> (~(dif fe 3) 63 64)
45+ > (~(dif fe 3) 63 64)
8746 255
88− ~zod/try=> (~(dif fe 3) 5 10)
47+ > (~(dif fe 3) 5 10)
8948 251
90− ~zod/try=> (~(dif fe 3) 0 1)
49+ > (~(dif fe 3) 0 1)
9150 255
92− ~zod/try=> (~(dif fe 0) 9 10)
51+ > (~(dif fe 0) 9 10)
9352 1
94− ~zod/try=> (~(dif fe 0) 9 11)
53+ > (~(dif fe 0) 9 11)
9554 0
96− ~zod/try=> (~(dif fe 0) 9 12)
55+ > (~(dif fe 0) 9 12)
9756 1
98− ~zod/try=> (~(dif fe 2) 9 12)
57+ > (~(dif fe 2) 9 12)
9958 13
100− ~zod/try=> (~(dif fe 2) 63 64)
59+ > (~(dif fe 2) 63 64)
10160 15
10261
10362------------------------------------------------------------------------
@@ -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,22 +81,22 @@ An atom.
12281Source
12382------
12483
125− ++ inv |=(b=@ (sub (dec out) (sit b)))
84+ ++ inv |=(b/@ (sub (dec out) (sit b)))
12685
12786Examples
12887--------
12988
130− ~zod/try=> (~(inv fe 3) 255)
89+ > (~(inv fe 3) 255)
13190 0
132− ~zod/try=> (~(inv fe 3) 256)
91+ > (~(inv fe 3) 256)
13392 255
134− ~zod/try=> (~(inv fe 3) 0)
93+ > (~(inv fe 3) 0)
13594 255
136− ~zod/try=> (~(inv fe 3) 1)
95+ > (~(inv fe 3) 1)
13796 254
138− ~zod/try=> (~(inv fe 3) 2)
97+ > (~(inv fe 3) 2)
13998 253
140− ~zod/try=> (~(inv fe 3) 55)
99+ > (~(inv fe 3) 55)
141100 200
142101
143102------------------------------------------------------------------------
@@ -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
@@ -173,51 +132,51 @@ Source
173132Examples
174133--------
175134
176− ~zod/try=> (~(net fe 3) 64)
135+ > (~(net fe 3) 64)
177136 64
178− ~zod/try=> (~(net fe 3) 128)
137+ > (~(net fe 3) 128)
179138 128
180− ~zod/try=> (~(net fe 3) 255)
139+ > (~(net fe 3) 255)
181140 255
182− ~zod/try=> (~(net fe 3) 256)
141+ > (~(net fe 3) 256)
183142 0
184− ~zod/try=> (~(net fe 3) 257)
143+ > (~(net fe 3) 257)
185144 1
186− ~zod/try=> (~(net fe 3) 500)
145+ > (~(net fe 3) 500)
187146 244
188− ~zod/try=> (~(net fe 3) 511)
147+ > (~(net fe 3) 511)
189148 255
190− ~zod/try=> (~(net fe 3) 512)
149+ > (~(net fe 3) 512)
191150 0
192− ~zod/try=> (~(net fe 3) 513)
151+ > (~(net fe 3) 513)
193152 1
194− ~zod/try=> (~(net fe 3) 0)
153+ > (~(net fe 3) 0)
195154 0
196− ~zod/try=> (~(net fe 3) 1)
155+ > (~(net fe 3) 1)
197156 1
198− ~zod/try=> (~(net fe 0) 1)
157+ > (~(net fe 0) 1)
199158 1
200− ~zod/try=> (~(net fe 0) 2)
159+ > (~(net fe 0) 2)
201160 0
202− ~zod/try=> (~(net fe 0) 3)
161+ > (~(net fe 0) 3)
203162 1
204− ~zod/try=> (~(net fe 6) 1)
163+ > (~(net fe 6) 1)
205164 72.057.594.037.927.936
206− ~zod/try=> (~(net fe 6) 2)
165+ > (~(net fe 6) 2)
207166 144.115.188.075.855.872
208− ~zod/try=> (~(net fe 6) 3)
167+ > (~(net fe 6) 3)
209168 216.172.782.113.783.808
210− ~zod/try=> (~(net fe 6) 4)
169+ > (~(net fe 6) 4)
211170 288.230.376.151.711.744
212− ~zod/try=> (~(net fe 6) 5)
171+ > (~(net fe 6) 5)
213172 360.287.970.189.639.680
214− ~zod/try=> (~(net fe 6) 6)
173+ > (~(net fe 6) 6)
215174 432.345.564.227.567.616
216− ~zod/try=> (~(net fe 6) 7)
175+ > (~(net fe 6) 7)
217176 504.403.158.265.495.552
218− ~zod/try=> (~(net fe 6) 512)
177+ > (~(net fe 6) 512)
219178 562.949.953.421.312
220− ~zod/try=> (~(net fe 6) 513)
179+ > (~(net fe 6) 513)
221180 72.620.543.991.349.248
222181
223182------------------------------------------------------------------------
@@ -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------
@@ -246,17 +205,17 @@ Source
246205Examples
247206--------
248207
249− ~zod/try=> ~(out fe 0)
208+ > ~(out fe 0)
250209 2
251− ~zod/try=> ~(out fe 1)
210+ > ~(out fe 1)
252211 4
253− ~zod/try=> ~(out fe 2)
212+ > ~(out fe 2)
254213 16
255− ~zod/try=> ~(out fe 3)
214+ > ~(out fe 3)
256215 256
257− ~zod/try=> ~(out fe 4)
216+ > ~(out fe 4)
258217 65.536
259− ~zod/try=> ~(out fe 10)
218+ > ~(out fe 10)
260219 \/179.769.313.486.231.590.772.930.519.078.902.473.361.797.697.894.230.657.\/
261220 273.430.081.157.732.675.805.500.963.132.708.477.322.407.536.021.120.113.
262221 879.871.393.357.658.789.768.814.416.622.492.847.430.639.474.124.377.767.
@@ -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)
@@ -301,15 +260,15 @@ Source
301260Examples
302261--------
303262
304− ~zod/try=> `@ux`(~(rol fe 6) 4 3 0xabac.dedf.1213)
263+ > `@ux`(~(rol fe 6) 4 3 0xabac.dedf.1213)
305264 0x1213.0000.abac.dedf
306− ~zod/try=> `@ux`(~(rol fe 6) 4 2 0xabac.dedf.1213)
265+ > `@ux`(~(rol fe 6) 4 2 0xabac.dedf.1213)
307266 0xdedf.1213.0000.abac
308− ~zod/try=> `@t`(~(rol fe 5) 3 1 'dfgh')
267+ > `@t`(~(rol fe 5) 3 1 'dfgh')
309268 'hdfg'
310− ~zod/try=> `@t`(~(rol fe 5) 3 2 'dfgh')
269+ > `@t`(~(rol fe 5) 3 2 'dfgh')
311270 'ghdf'
312− ~zod/try=> `@t`(~(rol fe 5) 3 0 'dfgh')
271+ > `@t`(~(rol fe 5) 3 0 'dfgh')
313272 'dfgh'
314273
315274------------------------------------------------------------------------
@@ -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,26 +298,27 @@ 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
351− ~zod/try=> `@ux`(~(ror fe 6) 4 1 0xabac.dedf.1213)
311+ > `@ux`(~(ror fe 6) 4 1 0xabac.dedf.1213)
352312 0x1213.0000.abac.dedf
353− ~zod/try=> `@ux`(~(ror fe 6) 3 5 0xabac.dedf.1213)
313+ > `@ux`(~(ror fe 6) 3 5 0xabac.dedf.1213)
354314 0xacde.df12.1300.00ab
355− ~zod/try=> `@ux`(~(ror fe 6) 3 3 0xabac.dedf.1213)
315+ > `@ux`(~(ror fe 6) 3 3 0xabac.dedf.1213)
356316 0xdf12.1300.00ab.acde
357− ~zod/try=> `@t`(~(rol fe 5) 3 0 'hijk')
317+ > `@t`(~(rol fe 5) 3 0 'hijk')
358318 'hijk'
359− ~zod/try=> `@t`(~(rol fe 5) 3 1 'hijk')
319+ > `@t`(~(rol fe 5) 3 1 'hijk')
360320 'khij'
361− ~zod/try=> `@t`(~(rol fe 5) 3 2 'hijk')
321+ > `@t`(~(rol fe 5) 3 2 'hijk')
362322 'jkhi'
363323
364324------------------------------------------------------------------------
@@ -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,36 +346,36 @@ 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--------
393353
394− ~zod/try=> (~(sum fe 3) 10 250)
354+ > (~(sum fe 3) 10 250)
395355 4
396− ~zod/try=> (~(sum fe 0) 0 1)
356+ > (~(sum fe 0) 0 1)
397357 1
398− ~zod/try=> (~(sum fe 0) 0 2)
358+ > (~(sum fe 0) 0 2)
399359 0
400− ~zod/try=> (~(sum fe 2) 14 2)
360+ > (~(sum fe 2) 14 2)
401361 0
402− ~zod/try=> (~(sum fe 2) 14 3)
362+ > (~(sum fe 2) 14 3)
403363 1
404− ~zod/try=> (~(sum fe 4) 10.000 256)
364+ > (~(sum fe 4) 10.000 256)
405365 10.256
406− ~zod/try=> (~(sum fe 4) 10.000 100.000)
366+ > (~(sum fe 4) 10.000 100.000)
407367 44.464
408368
409369### `++sit`
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,32 +387,32 @@ 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--------
434394
435− ~zod/try=> (~(sit fe 3) 255)
395+ > (~(sit fe 3) 255)
436396 255
437− ~zod/try=> (~(sit fe 3) 256)
397+ > (~(sit fe 3) 256)
438398 0
439− ~zod/try=> (~(sit fe 3) 257)
399+ > (~(sit fe 3) 257)
440400 1
441− ~zod/try=> (~(sit fe 2) 257)
401+ > (~(sit fe 2) 257)
442402 1
443− ~zod/try=> (~(sit fe 2) 10.000)
403+ > (~(sit fe 2) 10.000)
444404 0
445− ~zod/try=> (~(sit fe 2) 100)
405+ > (~(sit fe 2) 100)
446406 4
447− ~zod/try=> (~(sit fe 2) 19)
407+ > (~(sit fe 2) 19)
448408 3
449− ~zod/try=> (~(sit fe 2) 17)
409+ > (~(sit fe 2) 17)
450410 1
451− ~zod/try=> (~(sit fe 0) 17)
411+ > (~(sit fe 0) 17)
452412 1
453− ~zod/try=> (~(sit fe 0) 0)
413+ > (~(sit fe 0) 0)
454414 0
455− ~zod/try=> (~(sit fe 0) 1)
415+ > (~(sit fe 0) 1)
456416 1
457417
458418
@@ -476,26 +436,26 @@ 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--------
493453
494− ~zod/try=> (abs:si -2)
454+ > (abs:si -2)
495455 2
496− ~zod/try=> (abs:si -10.000)
456+ > (abs:si -10.000)
497457 10.000
498− ~zod/try=> (abs:si --2)
458+ > (abs:si --2)
499459 2
500460
501461------------------------------------------------------------------------
@@ -509,32 +469,32 @@ 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
529489--------
530490
531− ~zod/try=> (dif:si --10 -7)
491+ > (dif:si --10 -7)
532492 --17
533− ~zod/try=> (dif:si --10 --7)
493+ > (dif:si --10 --7)
534494 --3
535− ~zod/try=> (dif:si `@s`0 --7)
495+ > (dif:si `@s`0 --7)
536496 -7
537− ~zod/try=> (dif:si `@s`0 `@s`7)
497+ > (dif:si `@s`0 `@s`7)
538498 --4
539499
540500------------------------------------------------------------------------
@@ -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,21 +520,21 @@ 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
567527--------
568528
569− ~zod/try=> (dul:si --9 3)
529+ > (dul:si --9 3)
570530 0
571− ~zod/try=> (dul:si --9 4)
531+ > (dul:si --9 4)
572532 1
573− ~zod/try=> (dul:si --9 5)
533+ > (dul:si --9 5)
574534 4
575− ~zod/try=> (dul:si --9 6)
535+ > (dul:si --9 6)
576536 3
577− ~zod/try=> (dul:si --90 --10)
537+ > (dul:si --90 --10)
578538 10
579539
580540------------------------------------------------------------------------
@@ -588,27 +548,27 @@ 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
607567--------
608568
609− ~zod/try=> (fra:si --10 -2)
569+ > (fra:si --10 -2)
610570 -5
611− ~zod/try=> (fra:si -20 -5)
571+ > (fra:si -20 -5)
612572 --4
613573
614574------------------------------------------------------------------------
@@ -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,60 +589,60 @@ 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
641601--------
642602
643− ~zod/try=> (new:si [& 10])
603+ > (new:si [& 10])
644604 --10
645− ~zod/try=> (new:si [| 10])
605+ > (new:si [| 10])
646606 -10
647− ~zod/try=> (new:si [%.y 7])
607+ > (new:si [%.y 7])
648608 --7
649609
650610------------------------------------------------------------------------
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--------
675635
676− ~zod/try=> (old:si 7)
636+ > (old:si 7)
677637 ! type-fail
678638 ! exit
679− ~zod/try=> (old:si -7)
639+ > (old:si -7)
680640 [%.n 7]
681− ~zod/try=> (old:si --7)
641+ > (old:si --7)
682642 [%.y 7]
683− ~zod/try=> (old:si `@s`7)
643+ > (old:si `@s`7)
684644 [%.n 4]
685− ~zod/try=> (old:si -0)
645+ > (old:si -0)
686646 [%.y 0]
687647
688648------------------------------------------------------------------------
@@ -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,19 +668,19 @@ 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
715675--------
716676
717− ~zod/try=> (pro:si -4 --2)
677+ > (pro:si -4 --2)
718678 -8
719− ~zod/try=> (pro:si -4 -2)
679+ > (pro:si -4 -2)
720680 --8
721− ~zod/try=> (pro:si --10.000.000 -10)
681+ > (pro:si --10.000.000 -10)
722682 -100.000.000
723− ~zod/try=> (pro:si -1.337 --0)
683+ > (pro:si -1.337 --0)
724684 --0
725685
726686------------------------------------------------------------------------
@@ -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,20 +706,20 @@ 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--------
753713
754− ~zod/try=> (rem:si -10 -4)
714+ > (rem:si -10 -4)
755715 -2
756− ~zod/try=> (rem:si --10 --4)
716+ > (rem:si --10 --4)
757717 --2
758− ~zod/try=> (rem:si --10 -4)
718+ > (rem:si --10 -4)
759719 --2
760− ~zod/try=> (rem:si --7 --3)
720+ > (rem:si --7 --3)
761721 --1
762− ~zod/try=> (rem:si --0 --10.000)
722+ > (rem:si --0 --10.000)
763723 --0
764724
765725------------------------------------------------------------------------
@@ -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
@@ -803,13 +763,13 @@ Source
803763Examples
804764--------
805765
806− ~zod/try=> (sum:si --10 --10)
766+ > (sum:si --10 --10)
807767 --20
808− ~zod/try=> (sum:si --10 -0)
768+ > (sum:si --10 -0)
809769 --10
810− ~zod/try=> (sum:si -10 -7)
770+ > (sum:si -10 -7)
811771 -17
812− ~zod/try=> (sum:si -10 --7)
772+ > (sum:si -10 --7)
813773 -3
814774
815775------------------------------------------------------------------------
@@ -820,36 +780,36 @@ 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--------
843803
844− ~zod/try=> `@s`10
804+ > `@s`10
845805 --5
846− ~zod/try=> (sun:si 10)
806+ > (sun:si 10)
847807 20
848− ~zod/try=> `@s`(sun:si 10)
808+ > `@s`(sun:si 10)
849809 --10
850− ~zod/try=> `@sd`(sun:si 10)
810+ > `@sd`(sun:si 10)
851811 --10
852− ~zod/try=> `@sd`(sun:si 12.345)
812+ > `@sd`(sun:si 12.345)
853813 --12.345
854814
855815------------------------------------------------------------------------
@@ -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,16 +833,16 @@ 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--------
880840
881− ~zod/try=> (syn:si -2)
841+ > (syn:si -2)
882842 %.n
883− ~zod/try=> (syn:si --2)
843+ > (syn:si --2)
884844 %.y
885− ~zod/try=> (syn:si -0)
845+ > (syn:si -0)
886846 %.y
887847
888848------------------------------------------------------------------------
@@ -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
@@ -927,14 +887,56 @@ Source
927887Examples
928888--------
929889
930− ~zod/try=> (cmp:si --10 --10)
890+ > (cmp:si --10 --10)
931891 --0
932− ~zod/try=> (cmp:si --10 -0)
892+ > (cmp:si --10 -0)
933893 --1
934− ~zod/try=> (cmp:si -10 -7)
894+ > (cmp:si -10 -7)
935895 -1
936− ~zod/try=> (cmp:si -10 --7)
896+ > (cmp:si -10 --7)
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+ > (egcd 20 15)
929+ [d=5 u=2 v=1]
930+ > (egcd 24 16)
931+ [d=8 u=2 v=1]
932+ > (egcd 7 5)
933+ [d=1 u=3 v=6]
934+ > (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+309−302
@@ -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+ > cet:yo
28+ 36.524
29+ > (add 365 cet:yo)
30+ 36.889
31+ > (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+ > day:yo
54+ 86.400
55+ > (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+ > hor:yo
101+ 3.600
102+ > (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+ > 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+ > 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+ > moh:yo
175+ ~[31 28 31 30 31 30 31 31 30 31 30 31]
176+ > (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+ > moy:yo
203+ ~[31 29 31 30 31 30 31 31 30 31 30 31]
204+ > (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+ > 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+ > 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,27 +287,28 @@ 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--------
47306
48− ~zod/try=> (yall 198)
307+ > (yall 198)
49308 [y=0 m=7 d=17]
50− ~zod/try=> (yall 90.398)
309+ > (yall 90.398)
51310 [y=247 m=7 d=3]
52− ~zod/try=> (yall 0)
311+ > (yall 0)
53312 [y=0 m=1 d=1]
54313
55314
@@ -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,15 +362,16 @@ 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--------
109369
110− ~zod/try=> (yawn 2.014 8 4)
370+ > (yawn 2.014 8 4)
111371 735.814
112− ~zod/try=> (yawn 1.776 7 4)
372+ > (yawn 1.776 7 4)
113373 648.856
114− ~zod/try=> (yawn 1.990 10 11)
374+ > (yawn 1.990 10 11)
115375 727.116
116376
117377
@@ -125,30 +385,31 @@ 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--------
150411
151− ~zod/try=> (year [[a=%.y y=2.014] m=8 t=[d=4 h=20 m=4 s=57 f=~[0xd940]]])
412+ > (year [[a=%.y y=2.014] m=8 t=[d=4 h=20 m=4 s=57 f=~[0xd940]]])
152413 0x8000000d227df4e9d940000000000000
153414
154415
@@ -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,15 +442,17 @@ Source
181442 =+ mit=(div sec mit:yo)
182443 => .(sec (mod sec mit:yo))
183444 [day hor mit sec fan]
445+ ::
446+
184447
185448Examples
186449--------
187450
188− ~zod/try=> (yell ~2014.3.20..05.42.53..7456)
451+ > (yell ~2014.3.20..05.42.53..7456)
189452 [d=106.751.991.820.094 h=5 m=42 s=53 f=~[0x7456]]
190− ~zod/try=> (yell ~2014.6.9..19.09.40..8b66)
453+ > (yell ~2014.6.9..19.09.40..8b66)
191454 [d=106.751.991.820.175 h=19 m=9 s=40 f=~[0x8b66]]
192− ~zod/try=> (yell ~1776.7.4)
455+ > (yell ~1776.7.4)
193456 [d=106.751.991.733.273 h=0 m=0 s=0 f=~]
194457
195458
@@ -221,13 +484,13 @@ Source
221484Examples
222485--------
223486
224− ~zod/try=> (yelp 2.014)
487+ > (yelp 2.014)
225488 %.n
226− ~zod/try=> (yelp 2.008)
489+ > (yelp 2.008)
227490 %.y
228− ~zod/try=> (yelp 0)
491+ > (yelp 0)
229492 %.y
230− ~zod/try=> (yelp 14.011)
493+ > (yelp 14.011)
231494 %.n
232495
233496
@@ -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,13 +522,14 @@ 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--------
265529
266− ~zod/try=> (yore -<-)
530+ > (yore -<-)
267531 [[a=%.y y=2.014] m=8 t=[d=4 h=20 m=17 s=1 f=~[0x700d]]]
268− ~zod/try=> (yore -<-)
532+ > (yore -<-)
269533 [[a=%.y y=2.014] m=8 t=[d=4 h=20 m=28 s=53 f=~[0x7b82]]]
270534
271535
@@ -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,282 +571,25 @@ 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--------
313578
314− ~zod/try=> =murica (yell ~1776.7.4)
315− ~zod/try=> murica
579+ > =murica (yell ~1776.7.4)
580+ > murica
316581 [d=106.751.991.733.273 h=0 m=0 s=0 f=~]
317− ~zod/try=> (yule murica)
582+ > (yule murica)
318583 0x8000000b62aaf5800000000000000000
319− ~zod/try=> `@da`(yule murica)
584+ > `@da`(yule murica)
320585 ~1776.7.4
321− ~zod/try=> `@da`(yule (yell ~2014.3.20..05.42.53..7456))
586+ > `@da`(yule (yell ~2014.3.20..05.42.53..7456))
322587 ~2014.3.20..05.42.53..7456
323− ~zod/try=> `tarp`[31 12 30 0 ~]
588+ > `tarp`[31 12 30 0 ~]
324589 [d=31 h=12 m=30 s=0 f=~]
325− ~zod/try=> `@dr`(yule `tarp`[31 12 30 0 ~])
590+ > `@dr`(yule `tarp`[31 12 30 0 ~])
326591 ~d31.h12.m30
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+105−94
@@ -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,14 +316,15 @@ Source
306316 [[1 mog] $(mig mog)]
307317 ::
308318
319+
309320Examples
310321--------
311322
312− ~zod/try=> `@ux`(wren:un 'testing')
323+ > `@ux`(wren:un 'testing')
313324 0x30.bf6a.b9fe.7d8f
314− ~zod/try=> `@ux`'testing'
325+ > `@ux`'testing'
315326 0x67.6e69.7473.6574
316− ~zod/try=> `@da`(wred:un (wren:un ~2001.2.5))
327+ > `@da`(wred:un (wren:un ~2001.2.5))
317328 ~2001.2.5
318329
319330------------------------------------------------------------------------
@@ -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))
@@ -358,11 +369,11 @@ Source
358369Examples
359370--------
360371
361− ~zod/try=> (wred:un 0x30.bf6a.b9fe.7d8f)
372+ > (wred:un 0x30.bf6a.b9fe.7d8f)
362373 29.113.321.805.538.676
363− ~zod/try=> `@t`(wred:un 0x30.bf6a.b9fe.7d8f)
374+ > `@t`(wred:un 0x30.bf6a.b9fe.7d8f)
364375 'testing'
365− ~zod/try=> (wred:un (wren:un 200.038.426))
376+ > (wred:un (wren:un 200.038.426))
366377 200.038.426
367378
368379------------------------------------------------------------------------
@@ -381,14 +392,14 @@ 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--------
388399
389− ~zod/try=> (xafo:un 5 6)
400+ > (xafo:un 5 6)
390401 11
391− ~zod/try=> (xafo:un 256 20)
402+ > (xafo:un 256 20)
392403 21
393404
394405------------------------------------------------------------------------
@@ -413,14 +424,14 @@ 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--------
420431
421− ~zod/try=> (xaro:un 17 57)
432+ > (xaro:un 17 57)
422433 40
423− ~zod/try=> (xaro:un 265 12)
434+ > (xaro:un 265 12)
424435 2
425436
426437------------------------------------------------------------------------
@@ -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.
@@ -466,11 +477,11 @@ Source
466477Examples
467478--------
468479
469− ~zod/try=> (zaft:un 0x12)
480+ > (zaft:un 0x12)
470481 42
471− ~zod/try=> (zaft:un 0xff)
482+ > (zaft:un 0xff)
472483 204
473− ~zod/try=> (zaft:un 0x0)
484+ > (zaft:un 0x0)
474485 ! decrement-underflow
475486 ! exit
476487
@@ -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.
@@ -516,9 +527,9 @@ Source
516527Examples
517528--------
518529
519− ~zod/try=> `@ux`(zart:un 204)
530+ > `@ux`(zart:un 204)
520531 0xff
521− ~zod/try=> `@ux`(zart:un 42)
532+ > `@ux`(zart:un 42)
522533 0x12
523534
524535------------------------------------------------------------------------
@@ -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.
@@ -564,11 +575,11 @@ Source
564575Examples
565576--------
566577
567− ~zod/try=> (zyft:un 0x12)
578+ > (zyft:un 0x12)
568579 57
569− ~zod/try=> (zyft:un 0x0)
580+ > (zyft:un 0x0)
570581 225
571− ~zod/try=> (zyft:un 0xff)
582+ > (zyft:un 0xff)
572583 187
573584
574585------------------------------------------------------------------------
@@ -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.
@@ -613,11 +624,11 @@ Source
613624Examples
614625--------
615626
616− ~zod/try=> `@ux`(zyrt:un 57)
627+ > `@ux`(zyrt:un 57)
617628 0x12
618− ~zod/try=> `@ux`(zyrt:un 225)
629+ > `@ux`(zyrt:un 225)
619630 0x0
620− ~zod/try=> `@ux`(zyrt:un 187)
631+ > `@ux`(zyrt:un 187)
621632 0xff
622633
623634
docs/system/hoon/library/3g.md+74−59
@@ -4,34 +4,34 @@
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
1818--------
1919
20− ~zod/try=> `coin`(need (slay '~s1'))
20+ > `coin`(need (slay '~s1'))
2121 [%$ p=[p=~.dr q=18.446.744.073.709.551.616]]
22− ~zod/try=> `coin`(need (slay '0x2b59'))
22+ > `coin`(need (slay '0x2b59'))
2323 [%$ p=[p=~.ux q=11.097]]
2424
25− ~zod/try=> ~(rend co [%many ~[[%$ %ud 1] [%$ %tas 'a'] [%$ %s -2]]])
25+ > ~(rend co [%many ~[[%$ %ud 1] [%$ %tas 'a'] [%$ %s -2]]])
2626 "._1_a_-2__"
27− ~zod/try=> ._1_a_-2__
27+ > ._1_a_-2__
2828 [1 %a -2]
2929
30− ~zod/try=> `@uv`(jam [3 4])
30+ > `@uv`(jam [3 4])
3131 0v2cd1
32− ~zod/try=> (slay '~02cd1')
32+ > (slay '~02cd1')
3333 [~ [%blob p=[3 4]]]
34− ~zod/try=> ~02cd1
34+ > ~02cd1
3535 [3 4]
3636
3737
@@ -41,20 +41,21 @@ 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--------
5657
57− ~zod/try=> +>:(slay '0x123')
58+ > +>:(slay '0x123')
5859 p=[p=~.ux q=291]
5960
6061
@@ -69,16 +70,17 @@ 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
79− ~zod/try=> *edge
81+ > *edge
8082 [p=[p=0 q=0] q=~]
81− ~zod/try=> (tall:vast [1 1] "a b")
83+ > (tall:vast [1 1] "a b")
8284 [p=[p=1 q=2] q=[~ [p=[%cnzz p=~[%a]] q=[p=[p=1 q=2] q=" b"]]]]
8385
8486
@@ -93,19 +95,20 @@ 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--------
100103
101− ~zod/try=> *hair
104+ > *hair
102105 [p=0 q=0]
103106
104− ~zod/try=> `hair`[1 1] :: parsing starts at [1 1] as a convention.
107+ > `hair`[1 1] :: parsing starts at [1 1] as a convention.
105108 [p=1 q=1]
106− ~zod/try=> ((plus ace) [1 1] " --")
109+ > ((plus ace) [1 1] " --")
107110 [p=[p=1 q=4] q=[~ u=[p=[~~. " "] q=[p=[p=1 q=4] q="--"]]]]
108− ~zod/try=> `hair`p:((plus ace) [1 1] " --")
111+ > `hair`p:((plus ace) [1 1] " --")
109112 [p=1 q=4]
110113
111114
@@ -120,21 +123,25 @@ 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--------
130− ~zod/try=> *(like char)
137+ > *(like char)
131138 [p=[p=0 q=0] q=~]
132139
133− ~zod/try=> (ace [1 1] " a")
140+ > (ace [1 1] " a")
134141 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
135− ~zod/try=> `(like char)`(ace [1 1] " a")
142+ > `(like char)`(ace [1 1] " a")
136143 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
137− ~zod/try=> `(like ,@)`(ace [1 1] " a")
144+ > `(like ,@)`(ace [1 1] " a")
138145 [p=[p=1 q=2] q=[~ [p=32 q=[p=[p=1 q=2] q="a"]]]]
139146
140147
@@ -149,14 +156,15 @@ 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--------
156164
157− ~zod/try=> +<:;~(plug cab cab)
165+ > +<:;~(plug cab cab)
158166 c=tub=[p=[p=0 q=0] q=""]
159− ~zod/try=> :: tub is a ++nail
167+ > :: tub is a ++nail
160168
161169
162170
@@ -165,18 +173,19 @@ 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--------
178187
179− ~zod/try=> `path`"abc"
188+ > `path`"abc"
180189 /a/b/c
181190
182191
@@ -187,20 +196,21 @@ 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--------
199209
200− ~zod/try=> !:(!!)
210+ > !:(!!)
201211 ! /~zod/try/~2014.9.20..01.22.04..52e3/:<[1 4].[1 6]>
202− ~zod/try=> :: !! always produces a crash
203− ~zod/try=> `pint`[[1 4] [1 6]]
212+ > :: !! always produces a crash
213+ > `pint`[[1 4] [1 6]]
204214 [p=[p=1 q=4] q=[p=1 q=6]]
205215
206216
@@ -217,19 +227,20 @@ 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--------
224235
225− ~zod/try=> *rule
236+ > *rule
226237 [p=[p=0 q=0] q=[~ [p=0 q=[p=[p=0 q=0] q=""]]]]
227238
228− ~zod/try=> ^+(rule [|=(a=nail [p.a ~])]:|6)
239+ > ^+(rule [|=(a=nail [p.a ~])]:|6)
229240 <1.dww [tub=[p=[p=@ud q=@ud] q=""] <101.jzo 1.ypj %164>]>
230− ~zod/try=> (^+(rule [|=(a=nail [p.a ~ u=['a' a]])]:|6) [1 1] "hi")
241+ > (^+(rule [|=(a=nail [p.a ~ u=['a' a]])]:|6) [1 1] "hi")
231242 [p=[p=1 q=1] q=[~ [p=97 q=[p=[p=1 q=1] q="hi"]]]]
232− ~zod/try=> ([|=(a=nail [p.a ~ u=['a' a]])]:|6 [1 1] "hi")
243+ > ([|=(a=nail [p.a ~ u=['a' a]])]:|6 [1 1] "hi")
233244 [[p=1 q=1] ~ u=['a' p=[p=1 q=1] q="hi"]]
234245
235246
@@ -239,19 +250,20 @@ 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--------
251263
252− ~zod/try=> :into /=main=/bin/fail/hoon '!: !!'
264+ > :into /=main=/bin/fail/hoon '!: !!'
253265 + /~zod/main/359/bin/fail/hoon
254− ~zod/try=> :fail
266+ > :fail
255267 ! /~zod/main/~2014.9.22..18.40.56..ef04/bin/fail/:<[1 5].[1 7]>
256268 ! exit
257269
@@ -268,19 +280,22 @@ 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+ > (mock [[20 21] 0 3] $~)
276292 [%0 p=21]
277−
278− ~zod/try=> (mock [[0] !=(.^(cy//=main/1))] ,~)
293+ > (mock [[0] !=(.^(cy//=main/1))] ,~)
279294 [%1 p=~[[31.075 1.685.027.454 1.852.399.981 49 0]]]
280− ~zod/try=> (path [31.075 1.685.027.454 1.852.399.981 49 0])
295+ > (path [31.075 1.685.027.454 1.852.399.981 49 0])
281296 /cy/~zod/main/1
282297
283− ~zod/try=> (mock [[1 2] !=(!:(+(.)))] ,~)
298+ > (mock [[1 2] !=(!:(+(.)))] ,~)
284299 [%2 p=~[[%leaf p="/~zod/try/~2014.9.23..18.34.32..d3c5/:<[1 20].[1 24]>"]]]
285300
286301
@@ -302,7 +317,7 @@ Examples
302317
303318See also: [`++edge`]()
304319
305− ~zod/try=> (wide:vast [1 1] "(add 2 2)")
320+ > (wide:vast [1 1] "(add 2 2)")
306321 [ p=[p=1 q=10]
307322 q
308323 [ ~
@@ -311,7 +326,7 @@ See also: [`++edge`]()
311326 ]
312327 ]
313328 ]
314− ~zod/try=> (wonk (wide:vast [1 1] "(add 2 2)"))
329+ > (wonk (wide:vast [1 1] "(add 2 2)"))
315330 [%cnhp p=[%cnzz p=~[%add]] q=~[[%dtzy p=%ud q=2] [%dtzy p=%ud q=2]]]
316331
317332
docs/system/hoon/library/4a.md+72−69
@@ -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,30 +55,30 @@ 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
7575--------
7676
77− ~zod/try=> (ind:po 'zod')
77+ > (ind:po 'zod')
7878 [~ 0]
79− ~zod/try=> (ind:po 'zam')
79+ > (ind:po 'zam')
8080 ~
81− ~zod/try=> (ind:po 'del')
81+ > (ind:po 'del')
8282 [~ 37]
8383
8484------------------------------------------------------------------------
@@ -92,31 +92,32 @@ 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
113− ~zod/try=> (ins:po 'mar')
114+ > (ins:po 'mar')
114115 [~ 1]
115− ~zod/try=> (ins:po 'son')
116+ > (ins:po 'son')
116117 [~ 164]
117− ~zod/try=> (ins:po 'pit')
118+ > (ins:po 'pit')
118119 [~ 242]
119− ~zod/try=> (ins:po 'pok')
120+ > (ins:po 'pok')
120121 ~
121122
122123------------------------------------------------------------------------
@@ -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,23 +143,25 @@ 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--------
150153
151− ~zod/try=> `@t`(tod:po 1)
154+ > `@t`(tod:po 1)
152155 'nec'
153− ~zod/try=> `@t`(tod:po 98)
156+ > `@t`(tod:po 98)
154157 'dec'
155− ~zod/try=> `@t`(tod:po 0)
158+ > `@t`(tod:po 0)
156159 'zod'
157− ~zod/try=> `@t`(tod:po 150)
160+ > `@t`(tod:po 150)
158161 'ryg'
159− ~zod/try=> `@t`(tod:po 255)
162+ > `@t`(tod:po 255)
160163 'fes'
161− ~zod/try=> `@t`(tod:po 256)
164+ > `@t`(tod:po 256)
162165 ! exit
163166
164167------------------------------------------------------------------------
@@ -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,18 +187,18 @@ 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--------
191194
192− ~zod/try=> `@t`(tos:po 0)
195+ > `@t`(tos:po 0)
193196 'doz'
194− ~zod/try=> `@t`(tos:po 120)
197+ > `@t`(tos:po 120)
195198 'fab'
196− ~zod/try=> `@t`(tos:po 43)
199+ > `@t`(tos:po 43)
197200 'pid'
198− ~zod/try=> `@t`(tos:po 253)
201+ > `@t`(tos:po 253)
199202 'mat'
200203
201204------------------------------------------------------------------------
docs/system/hoon/library/4b.md+303−300
@@ -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,21 +170,20 @@ 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--------
30179
31− ~zod/try=> (cass "john doe")
180+ > (cass "john doe")
32181 7.309.170.810.699.673.450
33− ~zod/try=> `cord`(cass "john doe")
182+ > `cord`(cass "john doe")
34183 'john doe'
35− ~zod/try=> (cass "abc, 123, !@#")
184+ > (cass "abc, 123, !@#")
36185 2.792.832.775.110.938.439.066.079.945.313
37− ~zod/try=> `cord`(cass "abc, 123, !@#")
186+ > `cord`(cass "abc, 123, !@#")
38187 'abc, 123, !@#'
39188
40189
@@ -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-------
@@ -63,11 +212,11 @@ Source
63212Examples
64213--------
65214
66− ~zod/try=> (crip "john doe")
215+ > (crip "john doe")
67216 'john doe'
68− ~zod/try=> (crip "abc 123 !@#")
217+ > (crip "abc 123 !@#")
69218 'abc 123 !@#'
70− ~zod/try=> `@ud`(crip "abc")
219+ > `@ud`(crip "abc")
71220 6.513.249
72221
73222
@@ -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-------
@@ -102,13 +251,13 @@ Source
102251Examples
103252--------
104253
105− ~zod/try=> (cuss "john doe")
254+ > (cuss "john doe")
106255 'JOHN DOE'
107− ~zod/try=> (cuss "abc ABC 123 !@#")
256+ > (cuss "abc ABC 123 !@#")
108257 'ABC ABC 123 !@#'
109− ~zod/try=> `@ud`(cuss "abc")
258+ > `@ud`(cuss "abc")
110259 4.407.873
111− ~zod/try=> (cuss "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsQqRrVvWwXxYyZz")
260+ > (cuss "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsQqRrVvWwXxYyZz")
112261 'AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSQQRRVVWWXXYYZZ'
113262
114263
@@ -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 ::
@@ -147,11 +296,11 @@ Source
147296Examples
148297--------
149298
150− /~zod/try=> (mesc "ham lus")
299+ /> (mesc "ham lus")
151300 "ham lus"
152− /~zod/try=> (mesc "bas\\hur")
301+ /> (mesc "bas\\hur")
153302 "bas\\\\hur"
154− /~zod/try=> (mesc "as'saß")
303+ /> (mesc "as'saß")
155304 "as\0x27/sa\0xc3/\0x9f/"
156305
157306
@@ -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
@@ -189,9 +338,9 @@ Source
189338Examples
190339--------
191340
192− /~zod/try=> (runt [2 '/'] "ham")
341+ /> (runt [2 '/'] "ham")
193342 "//ham"
194− /~zod/try=> (runt [10 'a'] "")
343+ /> (runt [10 'a'] "")
195344 "aaaaaaaaaa"
196345
197346
@@ -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+ /> `(unit @ta)`((sand %ta) 'sym-som')
231380 [~ ~.sym-som]
232− /~zod/try=> `(unit ,@ta)`((sand %ta) 'err!')
381+ /> `(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)]
@@ -295,11 +444,11 @@ Source
295444Examples
296445--------
297446
298− /~zod/try=> ((sane %tas) %mol)
447+ /> ((sane %tas) %mol)
299448 %.y
300− /~zod/try=> ((sane %tas) 'lam')
449+ /> ((sane %tas) 'lam')
301450 %.y
302− /~zod/try=> ((sane %tas) 'more ace')
451+ /> ((sane %tas) 'more ace')
303452 %.n
304453
305454
@@ -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,21 +473,20 @@ 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--------
338486
339− /~zod/try=> (teff 'a')
487+ /> (teff 'a')
340488 1
341− /~zod/try=> (teff 'ß')
489+ /> (teff 'ß')
342490 2
343491
344492
@@ -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,23 +513,23 @@ 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
382− /~zod/try=> (trim 5 "lasok termun")
530+ /> (trim 5 "lasok termun")
383531 [p="lasok" q=" termun"]
384− /~zod/try=> (trim 5 "zam")
532+ /> (trim 5 "zam")
385533 [p="zam" q=""]
386534
387535
@@ -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,20 +556,21 @@ 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
420− /~zod/try=> (trip 'john doe')
569+ /> (trip 'john doe')
421570 "john doe"
422− /~zod/try=> (trip 'abc 123 !@#')
571+ /> (trip 'abc 123 !@#')
423572 "abc 123 !@#"
424− /~zod/try=> (trip 'abc')
573+ /> (trip 'abc')
425574 "abc"
426575
427576
@@ -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,23 +590,23 @@ 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
455604Examples
456605--------
457606
458− /~zod/try=> (tuba "я тут")
607+ /> (tuba "я тут")
459608 ~[~-~44f. ~-. ~-~442. ~-~443. ~-~442.]
460− /~zod/try=> (tuba "chars")
609+ /> (tuba "chars")
461610 ~[~-c ~-h ~-a ~-r ~-s]
462611
463612
@@ -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))
@@ -492,9 +641,9 @@ Source
492641Examples
493642--------
494643
495− /~zod/try=> (tufa ~[~-~44f. ~-. ~-~442. ~-~443. ~-~442.])
644+ /> (tufa ~[~-~44f. ~-. ~-~442. ~-~443. ~-~442.])
496645 "я тут"
497− /~zod/try=> (tufa ((list ,@c) ~[%a %b 0xb1 %c]))
646+ /> (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))
@@ -553,9 +702,9 @@ Source
553702Examples
554703--------
555704
556− /~zod/try=> (tuft `@c`%a)
705+ /> (tuft `@c`%a)
557706 'a'
558− /~zod/try=> (tuft `@c`0xb6)
707+ /> (tuft `@c`0xb6)
559708 '¶'
560709
561710
@@ -565,53 +714,55 @@ 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
604755--------
605756
606− /~zod/try=> (turf 'my ßam')
757+ /> (turf 'my ßam')
607758 ~-my.~df.am
608− /~zod/try=> 'я тут'
759+ /> 'я тут'
609760 'я тут'
610− /~zod/try=> (turf 'я тут')
761+ /> (turf 'я тут')
611762 ~-~44f..~442.~443.~442.
612− /~zod/try=> `@ux`'я тут'
763+ /> `@ux`'я тут'
613764 0x82.d183.d182.d120.8fd1
614− /~zod/try=> `@ux`(turf 'я тут')
765+ /> `@ux`(turf 'я тут')
615766 0x442.0000.0443.0000.0442.0000.0020.0000.044f
616767
617768
@@ -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
@@ -652,13 +803,13 @@ Source
652803Examples
653804--------
654805
655− /~zod/try=> (wack '~20_sam~')
806+ /> (wack '~20_sam~')
656807 ~.~~20~-sam~~
657− /~zod/try=> `@t`(wack '~20_sam~')
808+ /> `@t`(wack '~20_sam~')
658809 '~~20~-sam~~'
659− ~zod/try=> ~(rend co %many ~[`ud/5 `ta/'~20_sam'])
810+ > ~(rend co %many ~[`ud/5 `ta/'~20_sam'])
660811 "._5_~~.~~20~-sam__"
661− ~zod/try=> ._5_~~.~~20~-sam__
812+ > ._5_~~.~~20~-sam__
662813 [5 ~.~20_sam]
663814
664815
@@ -668,41 +819,45 @@ 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
701856--------
702857
703− /~zod/try=> `@t`(wick '~-ams~~lop')
858+ /> `@t`(wick '~-ams~~lop')
704859 '_ams~lop'
705− /~zod/try=> `@t`(wick (wack '~20_sam~'))
860+ /> `@t`(wick (wack '~20_sam~'))
706861 '~20_sam~'
707862
708863
@@ -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,15 +911,15 @@ 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
764919Examples
765920--------
766921
767− /~zod/try=> (woad ~.~b6.20.as)
922+ /> (woad ~.~b6.20.as)
768923 '¶20 as'
769924
770925
@@ -774,204 +929,52 @@ 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--------
824975
825− /~zod/try=> (wood 'my ßam')
976+ /> (wood 'my ßam')
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+ /> ~(. 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+ /> ~(ram re leaf+"foo")
16964 "foo"
170− /~zod/try=> ~(ram re rose/["." "(" ")"]^~[leaf/"bar" leaf/"baz" leaf/"bam"])
65+ /> ~(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+ /> (~(win re leaf+"samoltekon-lapdok") 0 20)
238120 <<"samoltekon-lapdok">>
239− /~zod/try=> (~(win re leaf/"samoltekon-lapdok") 0 10)
121+ /> (~(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+ /> (~(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+ /> (~(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+17−17
@@ -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,24 +21,23 @@ 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
3332--------
3433
35− ~zod/try=> (last [1 1] [1 2])
34+ > (last [1 1] [1 2])
3635 [p=1 q=2]
37− ~zod/try=> (last [2 1] [1 2])
36+ > (last [2 1] [1 2])
3837 [p=2 q=1]
39− ~zod/try=> (last [0 0] [99 0])
38+ > (last [0 0] [99 0])
4039 [p=99 q=0]
41− ~zod/try=> (last [7 7] [7 7])
40+ > (last [7 7] [7 7])
4241 [p=7 q=7]
4342
4443
@@ -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,23 +65,24 @@ 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
7575--------
7676
77− ~zod/try=> (lust `a` [1 1])
77+ > (lust `a` [1 1])
7878 [p=1 q=2]
79− ~zod/try=> (lust `@t`10 [1 1])
79+ > (lust `@t`10 [1 1])
8080 [p=2 q=1]
81− ~zod/try=> (lust '9' [10 10])
81+ > (lust '9' [10 10])
8282 [p=10 q=11]
83− /~zod/try=> (roll "maze" [.(+<+ [1 1])]:lust)
83+ /> (roll "maze" [.(+<+ [1 1])]:lust)
8484 [1 5]
85− /~zod/try=> %- roll :_ [.(+<+ [1 1])]:lust
85+ /> %- roll :_ [.(+<+ [1 1])]:lust
8686 """
8787 Sam
8888 lokes
docs/system/hoon/library/4e.md+75−72
@@ -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+ > (;~((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+ > (;~((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+ > (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+ > (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+ > `(unit @tas)`(scan "" ;~((bend) (easy ~) sym))
5959 ~
60− ~zod/try=> `(unit ,@tas)`(scan "sep" ;~((bend) (easy ~) sym))
60+ > `(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+ > (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+ > (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,14 +134,14 @@ 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--------
140141
141− ~zod/try=> (fail [[1 1] "abc"])
142+ > (fail [[1 1] "abc"])
142143 [p=[p=1 q=1] q=~]
143− ~zod/try=> (fail [[p=1.337 q=70] "Parse me, please?"])
144+ > (fail [[p=1.337 q=70] "Parse me, please?"])
144145 [p=[p=1.337 q=70] q=~]
145146
146147
@@ -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,22 +174,22 @@ 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
182183Examples
183184--------
184185
185− ~zod/try=> (scan "200|mal|bon" ;~((glue bar) dem sym sym))
186+ > (scan "200|mal|bon" ;~((glue bar) dem sym sym))
186187 [q=200 7.102.829 7.237.474]
187− ~zod/try=> `[@u @tas @tas]`(scan "200|mal|bon" ;~((glue bar) dem sym sym))
188+ > `[@u @tas @tas]`(scan "200|mal|bon" ;~((glue bar) dem sym sym))
188189 [200 %mal %bon]
189− ~zod/try=> (scan "200|;|bon" ;~((glue bar) dem sem sym))
190+ > (scan "200|;|bon" ;~((glue bar) dem sem sym))
190191 [q=200 ~~~3b. 7.237.474]
191− ~zod/try=> (scan "200.;.bon" ;~((glue dot) dem sem sym))
192+ > (scan "200.;.bon" ;~((glue dot) dem sem sym))
192193 [q=200 ~~~3b. 7.237.474]
193194
194195
@@ -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,22 +218,22 @@ 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
228229--------
229230
230− ~zod/try=> (scan "sas-/lo" (star ;~(less lus bar prn)))
231+ > (scan "sas-/lo" (star ;~(less lus bar prn)))
231232 "sas-/lo"
232− ~zod/try=> (scan "sas-/l+o" (star ;~(less lus bar prn)))
233+ > (scan "sas-/l+o" (star ;~(less lus bar prn)))
233234 ! {1 8}
234235 ! exit
235− ~zod/try=> (scan "sas|-/lo" (star ;~(less lus bar prn)))
236+ > (scan "sas|-/lo" (star ;~(less lus bar prn)))
236237 ! {1 5}
237238 ! exit
238239
@@ -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,15 +262,14 @@ Source
261262
262263 ++ pfix :: discard first rule
263264 ~/ %pfix
264− (comp |*([a=* b=*] b))
265− ::
265+ (comp |*({a/* b/*} b))
266266
267267Examples
268268--------
269269
270− ~zod/try=> `@t`(scan "%him" ;~(pfix cen sym))
270+ > `@t`(scan "%him" ;~(pfix cen sym))
271271 'him'
272− ~zod/try=> (scan "+++10" ;~(pfix (star lus) dem))
272+ > (scan "+++10" ;~(pfix (star lus) dem))
273273 q=10
274274
275275
@@ -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)
@@ -313,11 +313,11 @@ Source
313313Examples
314314--------
315315
316− ~zod/try=> (scan "1..20" ;~(plug dem dot dot dem))
316+ > (scan "1..20" ;~(plug dem dot dot dem))
317317 [q=1 ~~~. ~~~. q=20]
318− ~zod/try=> (scan "moke/~2014.1.1" ;~(plug sym fas nuck:so))
318+ > (scan "moke/~2014.1.1" ;~(plug sym fas nuck:so))
319319 [1.701.539.693 ~~~2f. [% p=[p=~.da q=170.141.184.500.766.106.671.844.917.172.921.958.400]]]
320− ~zod/try=> ;;(,[@tas @t ~ %da @da] (scan "moke/~2014.1.1" ;~(plug sym fas nuck:so)))
320+ > ;;(,[@tas @t ~ %da @da] (scan "moke/~2014.1.1" ;~(plug sym fas nuck:so)))
321321 [%moke '/' ~ %da ~2014.1.1]
322322
323323
@@ -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,22 +347,24 @@ 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--------
358360
359− ~zod/try=> `@t`(scan "+" ;~(pose lus tar cen))
361+ > `@t`(scan "+" ;~(pose lus tar cen))
360362 '+'
361− ~zod/try=> `@t`(scan "*" ;~(pose lus tar cen))
363+ > `@t`(scan "*" ;~(pose lus tar cen))
362364 '*'
363− ~zod/try=> `@t`(scan "%" ;~(pose lus tar cen))
365+ > `@t`(scan "%" ;~(pose lus tar cen))
364366 '%'
365− ~zod/try=> `@t`(scan "-" ;~(pose lus tar cen))
367+ > `@t`(scan "-" ;~(pose lus tar cen))
366368 ! {1 1}
367369 ! exit
368370
@@ -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,14 +395,15 @@ Source
393395
394396 ++ sfix :: discard second rule
395397 ~/ %sfix
396− (comp |*([a=* b=*] a))
398+ (comp |*({a/* b/*} a))
399+
397400
398401Examples
399402--------
400403
401− ~zod/try=> `@t`(scan "him%" ;~(sfix sym cen))
404+ > `@t`(scan "him%" ;~(sfix sym cen))
402405 'him'
403− ~zod/try=> (scan "10+++" ;~(sfix dem (star lus)))
406+ > (scan "10+++" ;~(sfix dem (star lus)))
404407 q=10
405408
406409
@@ -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)
@@ -439,13 +442,13 @@ Source
439442Examples
440443--------
441444
442− ~zod/try=> (scan "~zod" scat:vast)
445+ > (scan "~zod" scat:vast)
443446 [%dtzy p=%p q=0]
444− ~zod/try=> (scan "%zod" scat:vast)
447+ > (scan "%zod" scat:vast)
445448 [%dtzz p=%tas q=6.582.138]
446− ~zod/try=> (scan "%zod" ;~(simu cen scat:vast))
449+ > (scan "%zod" ;~(simu cen scat:vast))
447450 [%dtzz p=%tas q=6.582.138]
448− ~zod/try=> (scan "~zod" ;~(simu cen scat:vast))
451+ > (scan "~zod" ;~(simu cen scat:vast))
449452 ! {1 1}
450453 ! exit
451454
docs/system/hoon/library/4f.md+221−201
@@ -1,41 +1,43 @@
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--------
3335
34− ~zod/try=> (scan "123" (bass 10 (star dit)))
36+ > (scan "123" (bass 10 (star dit)))
3537 q=123
36− ~zod/try=> (scan "123" (bass 8 (star dit)))
38+ > (scan "123" (bass 8 (star dit)))
3739 q=83
38− ~zod/try=> `@ub`(scan "123" (bass 8 (star dit)))
40+ > `@ub`(scan "123" (bass 8 (star dit)))
3941 0b101.0011
4042
4143
@@ -44,41 +46,43 @@ 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--------
7680
77− ~zod/try=> (scan "123" (boss 10 (star dit)))
81+ > (scan "123" (boss 10 (star dit)))
7882 q=321
79− ~zod/try=> `@t`(scan "bam" (boss 256 (star alp)))
83+ > `@t`(scan "bam" (boss 256 (star alp)))
8084 'bam'
81− ~zod/try=> `@ux`(scan "bam" (boss 256 (star alp)))
85+ > `@ux`(scan "bam" (boss 256 (star alp)))
8286 0x6d.6162
8387
8488
@@ -87,41 +91,40 @@ 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--------
121124
122− ~zod/try=> ((cold %foo (just 'a')) [[1 1] "abc"])
125+ > ((cold %foo (just 'a')) [[1 1] "abc"])
123126 [p=[p=1 q=2] q=[~ u=[p=%foo q=[p=[p=1 q=2] q="bc"]]]]
124− ~zod/try=> ((cold %foo (just 'a')) [[1 1] "bc"])
127+ > ((cold %foo (just 'a')) [[1 1] "bc"])
125128 [p=[p=1 q=1] q=~]
126129
127130
@@ -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
@@ -163,13 +166,13 @@ Source
163166Examples
164167--------
165168
166− ~zod/try=> ((cook ,@ud (just 'a')) [[1 1] "abc"])
169+ > ((cook ,@ud (just 'a')) [[1 1] "abc"])
167170 [p=[p=1 q=2] q=[~ u=[p=97 q=[p=[p=1 q=2] q="bc"]]]]
168− ~zod/try=> ((cook ,@tas (just 'a')) [[1 1] "abc"])
171+ > ((cook ,@tas (just 'a')) [[1 1] "abc"])
169172 [p=[p=1 q=2] q=[~ u=[p=%a q=[p=[p=1 q=2] q="bc"]]]]
170− ~zod/try=> ((cook |=(a=@ +(a)) (just 'a')) [[1 1] "abc"])
173+ > ((cook |=(a=@ +(a)) (just 'a')) [[1 1] "abc"])
171174 [p=[p=1 q=2] q=[~ u=[p=98 q=[p=[p=1 q=2] q="bc"]]]]
172− ~zod/try=> ((cook |=(a=@ `@t`+(a)) (just 'a')) [[1 1] "abc"])
175+ > ((cook |=(a=@ `@t`+(a)) (just 'a')) [[1 1] "abc"])
173176 [p=[p=1 q=2] q=[~ u=[p='b' q=[p=[p=1 q=2] q="bc"]]]]
174177
175178
@@ -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------
@@ -207,11 +210,11 @@ Source
207210Examples
208211--------
209212
210− ~zod/try=> ((easy %foo) [[1 1] "abc"])
213+ > ((easy %foo) [[1 1] "abc"])
211214 [p=[p=1 q=1] q=[~ [p=%foo q=[p=[p=1 q=1] q="abc"]]]]
212− ~zod/try=> ((easy %foo) [[1 1] "bc"])
215+ > ((easy %foo) [[1 1] "bc"])
213216 [p=[p=1 q=1] q=[~ [p=%foo q=[p=[p=1 q=1] q="bc"]]]]
214− ~zod/try=> ((easy 'a') [[1 1] "bc"])
217+ > ((easy 'a') [[1 1] "bc"])
215218 [p=[p=1 q=1] q=[~ [p='a' q=[p=[p=1 q=1] q="bc"]]]]
216219
217220
@@ -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--------
@@ -247,11 +250,11 @@ Source
247250Examples
248251--------
249252
250− ~zod/try=> ((full (just 'a')) [[1 1] "ab"])
253+ > ((full (just 'a')) [[1 1] "ab"])
251254 [p=[p=1 q=2] q=~]
252− ~zod/try=> ((full (jest 'ab')) [[1 1] "ab"])
255+ > ((full (jest 'ab')) [[1 1] "ab"])
253256 [p=[p=1 q=3] q=[~ u=[p='ab' q=[p=[p=1 q=3] q=""]]]]
254− ~zod/try=> ((full ;~(plug (just 'a') (just 'b'))) [[1 1] "ab"])
257+ > ((full ;~(plug (just 'a') (just 'b'))) [[1 1] "ab"])
255258 [p=[p=1 q=3] q=[~ u=[p=[~~a ~~b] q=[p=[p=1 q=3] q=""]]]]
256259
257260
@@ -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,17 +282,16 @@ 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--------
289291
290− ~zod/try=> ((funk "abc prefix-" (jest 'abc')) [[1 1] "to be parsed"])
292+ > ((funk "abc prefix-" (jest 'abc')) [[1 1] "to be parsed"])
291293 [p=[p=1 q=4] q=[~ [p='abc' q=[p=[p=1 q=4] q=" prefix-to be parsed"]]]]
292− ~zod/try=> ((funk "parse" (just 'a')) [[1 4] " me"])
294+ > ((funk "parse" (just 'a')) [[1 4] " me"])
293295 [p=[p=1 q=4] q=~]
294296
295297
@@ -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
@@ -332,11 +334,11 @@ Source
332334Examples
333335--------
334336
335− ~zod/try=> (scan "abc" (star alf))
337+ > (scan "abc" (star alf))
336338 "abc"
337− ~zod/try=> (scan "abc" (here |*(^ +<) (star alf)))
339+ > (scan "abc" (here |*(^ +<) (star alf)))
338340 [[[p=1 q=1] p=1 q=4] "abc"]
339− ~zod/try=> (scan "abc" (star (here |*(^ +<) alf)))
341+ > (scan "abc" (star (here |*(^ +<) alf)))
340342 ~[[[[p=1 q=1] p=1 q=2] ~~a] [[[p=1 q=2] p=1 q=3] ~~b] [[[p=1 q=3] p=1 q=4] ~~c]]
341343
342344
@@ -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,15 +367,19 @@ 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--------
373379
374− ~zod/try=> (scan "-40-" (ifix [hep hep] dem))
380+ > (scan "-40-" (ifix [hep hep] dem))
375381 q=40
376− ~zod/try=> (scan "4my4" (ifix [dit dit] (star alf)))
382+ > (scan "4my4" (ifix [dit dit] (star alf)))
377383 "my"
378384
379385
@@ -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 ::
@@ -413,17 +419,17 @@ Source
413419Examples
414420--------
415421
416− ~zod/try=> ((jest 'abc') [[1 1] "abc"])
422+ > ((jest 'abc') [[1 1] "abc"])
417423 [p=[p=1 q=4] q=[~ [p='abc' q=[p=[p=1 q=4] q=""]]]]
418− ~zod/try=> (scan "abc" (jest 'abc'))
424+ > (scan "abc" (jest 'abc'))
419425 'abc'
420− ~zod/try=> (scan "abc" (jest 'acb'))
426+ > (scan "abc" (jest 'acb'))
421427 ! {1 2}
422428 ! 'syntax-error'
423429 ! exit
424− ~zod/try=> ((jest 'john doe') [[1 1] "john smith"])
430+ > ((jest 'john doe') [[1 1] "john smith"])
425431 [p=[p=1 q=6] q=~]
426− ~zod/try=> ((jest 'john doe') [[1 1] "john doe"])
432+ > ((jest 'john doe') [[1 1] "john doe"])
427433 [p=[p=1 q=9] q=[~ [p='john doe' q=[p=[p=1 q=9] q=""]]]]
428434
429435
@@ -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)
@@ -465,15 +471,15 @@ Source
465471Examples
466472--------
467473
468− ~zod/try=> ((just 'a') [[1 1] "abc"])
474+ > ((just 'a') [[1 1] "abc"])
469475 [p=[p=1 q=2] q=[~ [p=~~a q=[p=[p=1 q=2] q="bc"]]]]
470− ~zod/try=> (scan "abc" (just 'a'))
476+ > (scan "abc" (just 'a'))
471477 ! {1 2}
472478 ! 'syntax-error'
473479 ! exit
474− ~zod/try=> (scan "a" (just 'a'))
480+ > (scan "a" (just 'a'))
475481 ~~a
476− ~zod/try=> (scan "%" (just '%'))
482+ > (scan "%" (just '%'))
477483 ~~~25.
478484
479485
@@ -491,30 +497,30 @@ 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
511517Examples
512518--------
513519
514− ~zod/try=> |-(;~(plug prn ;~(pose $ (easy ~))))
520+ > |-(;~(plug prn ;~(pose $ (easy ~))))
515521 ! rest-loop
516522 ! exit
517− ~zod/try=> |-(;~(plug prn ;~(pose (knee *tape |.(^$)) (easy ~))))
523+ > |-(;~(plug prn ;~(pose (knee *tape |.(^$)) (easy ~))))
518524 < 1.obo
519525 [ c=c=tub=[p=[p=@ud q=@ud] q=""]
520526 b
@@ -529,7 +535,7 @@ Examples
529535 ... 450 lines omitted ...
530536 ]
531537 >
532− ~zod/try=> (scan "abcd" |-(;~(plug prn ;~(pose (knee *tape |.(^$)) (easy ~)))))
538+ > (scan "abcd" |-(;~(plug prn ;~(pose (knee *tape |.(^$)) (easy ~)))))
533539 [~~a "bcd"]
534540
535541
@@ -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 ::
@@ -571,13 +577,13 @@ Source
571577Examples
572578--------
573579
574− ~zod/try=> (scan "a" (mask "cba"))
580+ > (scan "a" (mask "cba"))
575581 ~~a
576− ~zod/try=> ((mask "abc") [[1 1] "abc"])
582+ > ((mask "abc") [[1 1] "abc"])
577583 [p=[p=1 q=2] q=[~ [p=~~a q=[p=[p=1 q=2] q="bc"]]]]
578− ~zod/try=> ((mask "abc") [[1 1] "bbc"])
584+ > ((mask "abc") [[1 1] "bbc"])
579585 [p=[p=1 q=2] q=[~ [p=~~b q=[p=[p=1 q=2] q="bc"]]]]
580− ~zod/try=> ((mask "abc") [[1 1] "dbc"])
586+ > ((mask "abc") [[1 1] "dbc"])
581587 [p=[p=1 q=1] q=~]
582588
583589
@@ -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,17 +611,18 @@ 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--------
613620
614− ~zod/try=> (scan "" (more ace dem))
621+ > (scan "" (more ace dem))
615622 ~
616− ~zod/try=> (scan "40 20" (more ace dem))
623+ > (scan "40 20" (more ace dem))
617624 [q=40 ~[q=20]]
618− ~zod/try=> (scan "40 20 60 1 5" (more ace dem))
625+ > (scan "40 20 60 1 5" (more ace dem))
619626 [q=40 ~[q=20 q=60 q=1 q=5]]
620627
621628
@@ -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,17 +650,18 @@ 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--------
651659
652− ~zod/try=> (scan "40 20" (most ace dem))
660+ > (scan "40 20" (most ace dem))
653661 [q=40 ~[q=20]]
654− ~zod/try=> (scan "40 20 60 1 5" (most ace dem))
662+ > (scan "40 20 60 1 5" (most ace dem))
655663 [q=40 ~[q=20 q=60 q=1 q=5]]
656− ~zod/try=> (scan "" (most ace dem))
664+ > (scan "" (most ace dem))
657665 ! {1 1}
658666 ! exit
659667
@@ -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)
@@ -691,9 +699,9 @@ Source
691699Examples
692700--------
693701
694− ~zod/try=> (next [[1 1] "ebc"])
702+ > (next [[1 1] "ebc"])
695703 [p=[p=1 q=2] q=[~ [p=~~e q=[p=[p=1 q=2] q="bc"]]]]
696− ~zod/try=> (next [[1 1] "john jumps jones"])
704+ > (next [[1 1] "john jumps jones"])
697705 [p=[p=1 q=2] q=[~ [p=~~j q=[p=[p=1 q=2] q="ohn jumps jones"]]]]
698706
699707
@@ -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,18 +727,19 @@ 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--------
726735
727− ~zod/try=> (scan ">>>>" (cook lent (plus gar)))
736+ > (scan ">>>>" (cook lent (plus gar)))
728737 4
729− ~zod/try=> (scan "- - " (plus ;~(pose ace hep)))
738+ > (scan "- - " (plus ;~(pose ace hep)))
730739 [~~- " - "]
731− ~zod/try=> `tape`(scan "- - " (plus ;~(pose ace hep)))
740+ > `tape`(scan "- - " (plus ;~(pose ace hep)))
732741 "- - "
733− ~zod/try=> `(pole ,@t)`(scan "- - " (plus ;~(pose ace hep)))
742+ > `(pole ,@t)`(scan "- - " (plus ;~(pose ace hep)))
734743 ['-' [' ' [' ' ['-' [' ' ~]]]]]
735744
736745
@@ -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,12 +776,13 @@ 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+ > ((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"]]]]
776− ~zod/try=> ((sear |=(* ~) (just 'a')) [[1 1] "abc"])
785+ > ((sear |=(* ~) (just 'a')) [[1 1] "abc"])
777786 [p=[p=1 q=2] q=~]
778787
779788
@@ -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)
@@ -816,11 +825,11 @@ Source
816825Examples
817826--------
818827
819− ~zod/try=> ((shim 'a' 'z') [[1 1] "abc"])
828+ > ((shim 'a' 'z') [[1 1] "abc"])
820829 [p=[p=1 q=2] q=[~ [p=~~a q=[p=[p=1 q=2] q="bc"]]]]
821− ~zod/try=> ((shim 'a' 'Z') [[1 1] "abc"])
830+ > ((shim 'a' 'Z') [[1 1] "abc"])
822831 [p=[p=1 q=1] q=~]
823− ~zod/try=> ((shim 'a' 'Z') [[1 1] "Abc"])
832+ > ((shim 'a' 'Z') [[1 1] "Abc"])
824833 [p=[p=1 q=2] q=[~ [p=~~~41. q=[p=[p=1 q=2] q="bc"]]]]
825834
826835
@@ -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
859− ~zod/try=> (scan "20+5+110" ((slug add) lus dem))
870+ > (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+ > `@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
@@ -899,11 +910,11 @@ Source
899910Examples
900911--------
901912
902− ~zod/try=> ((stag %foo (just 'a')) [[1 1] "abc"])
913+ > ((stag %foo (just 'a')) [[1 1] "abc"])
903914 [p=[p=1 q=2] q=[~ u=[p=[%foo ~~a] q=[p=[p=1 q=2] q="bc"]]]]
904− ~zod/try=> ((stag "xyz" (jest 'abc')) [[1 1] "abc"])
915+ > ((stag "xyz" (jest 'abc')) [[1 1] "abc"])
905916 [p=[p=1 q=4] q=[~ u=[p=["xyz" 'abc'] q=[p=[p=1 q=4] q=""]]]]
906− ~zod/try=> ((stag 10.000 (shim 0 100)) [[1 1] "abc"])
917+ > ((stag 10.000 (shim 0 100)) [[1 1] "abc"])
907918 [p=[p=1 q=2] q=[~ u=[p=[10.000 ~~a] q=[p=[p=1 q=2] q="bc"]]]]
908919
909920
@@ -913,36 +924,36 @@ 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--------
932943
933− ~zod/try=> (scan "aaaaa" (just 'a'))
944+ > (scan "aaaaa" (just 'a'))
934945 ! {1 2}
935946 ! 'syntax-error'
936947 ! exit
937− ~zod/try=> (scan "aaaaa" (star (just 'a')))
948+ > (scan "aaaaa" (star (just 'a')))
938949 "aaaaa"
939− ~zod/try=> (scan "abcdef" (star (just 'a')))
950+ > (scan "abcdef" (star (just 'a')))
940951 ! {1 2}
941952 ! 'syntax-error'
942953 ! exit
943− ~zod/try=> (scan "abcabc" (star (jest 'abc')))
954+ > (scan "abcabc" (star (jest 'abc')))
944955 <|abc abc|>
945− ~zod/try=> (scan "john smith" (star (shim 0 200)))
956+ > (scan "john smith" (star (shim 0 200)))
946957 "john smith"
947958
948959
@@ -968,7 +979,7 @@ Source
968979------
969980
970981 ++ stet
971− |* leh=(list ,[?(@ [@ @]) _rule])
982+ |* leh/(list {?(@ {@ @}) rule})
972983 |-
973984 ?~ leh
974985 ~
@@ -978,7 +989,7 @@ Source
978989Examples
979990--------
980991
981− ~zod/try=> (stet (limo [[5 (just 'a')] [1 (jest 'abc')] [[1 1] (shim 0 200)]
992+ > (stet (limo [[5 (just 'a')] [1 (jest 'abc')] [[1 1] (shim 0 200)]
982993 [[1 10] (cold %foo (just 'a'))]~]))
983994 ~[
984995 [p=5 q=<1.lrk [tub=[p=[p=@ud q=@ud] q=""] <1.nqy [daf=@tD <394.imz 97.kdz 1.xlc %164>]>]>]
@@ -986,12 +997,12 @@ Examples
986997 [p=[1 1] q=<1.lrk [tub=[p=[p=@ud q=@ud] q=""] <1.nqy [daf=@tD <394.imz 97.kdz 1.xlc %164>]>]>]
987998 [p=[1 10] q=<1.lrk [tub=[p=[p=@ud q=@ud] q=""] <1.nqy [daf=@tD <394.imz 97.kdz 1.xlc %164>]>]>]
988999 ]
989− ~zod/try=> [[[1 1] (just 'a')] [[2 1] (shim 0 200)] ~]
1000+ > [[[1 1] (just 'a')] [[2 1] (shim 0 200)] ~]
9901001 [ [[1 1] <1.tnv [tub=[p=[p=@ud q=@ud] q=""] <1.ktu [daf=@tD <414.fvk 101.jzo 1.ypj %164>]>]>]
9911002 [[2 1] <1.fvg [tub=[p=[p=@ud q=@ud] q=""] <1.khu [[les=@ mos=@] <414.fvk 101.jzo 1.ypj %164>]>]>]
9921003 ~
9931004 ]
994− ~zod/try=> (stet (limo [[[1 1] (just 'a')] [[2 1] (shim 0 200)] ~]))
1005+ > (stet (limo [[[1 1] (just 'a')] [[2 1] (shim 0 200)] ~]))
9951006 ~[
9961007 [p=[1 1] q=<1.lrk [tub=[p=[p=@ud q=@ud] q=""] <1.nqy [daf=@tD <394.imz 97.kdz 1.xlc %164>]>]>]
9971008 [p=[2 1] q=<1.lrk [tub=[p=[p=@ud q=@ud] q=""] <1.nqy [daf=@tD <394.imz 97.kdz 1.xlc %164>]>]>]
@@ -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,26 +1093,33 @@ 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--------
10991119
1100− ~zod/try=> (scan "abc" (stir *@ add prn))
1120+ > (scan "abc" (stir *@ add prn))
11011121 294
1102− ~zod/try=> (roll "abc" add)
1122+ > (roll "abc" add)
11031123 b=294
11041124
11051125
@@ -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
@@ -1149,11 +1169,11 @@ Source
11491169Examples
11501170--------
11511171
1152− ~zod/try=> ((stun [5 10] prn) [1 1] "aquickbrownfoxran")
1172+ > ((stun [5 10] prn) [1 1] "aquickbrownfoxran")
11531173 [p=[p=1 q=11] q=[~ [p="aquickbrow" q=[p=[p=1 q=11] q="nfoxran"]]]]
1154− ~zod/try=> ((stun [5 10] prn) [1 1] "aquickbro")
1174+ > ((stun [5 10] prn) [1 1] "aquickbro")
11551175 [p=[p=1 q=10] q=[~ [p="aquickbro" q=[p=[p=1 q=10] q=""]]]]
1156− ~zod/try=> ((stun [5 10] prn) [1 1] "aqui")
1176+ > ((stun [5 10] prn) [1 1] "aqui")
11571177 [p=[p=1 q=5] q=~]
11581178
11591179***
docs/system/hoon/library/4g.md+29−26
@@ -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,20 +21,21 @@ 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--------
2829
29− ~zod/try=> (rash 'I was the world in which I walked, and what I saw' (star (shim 0 200)))
30+ > (rash 'I was the world in which I walked, and what I saw' (star (shim 0 200)))
3031 "I was the world in which I walked, and what I saw"
31− ~zod/try=> (rash 'abc' (just 'a'))
32+ > (rash 'abc' (just 'a'))
3233 ! {1 2}
3334 ! 'syntax-error'
3435 ! exit
35− ~zod/try=> (rash 'abc' (jest 'abc'))
36+ > (rash 'abc' (jest 'abc'))
3637 'abc'
37− `~zod/try=> (rash 'abc' (jest 'ab'))
38+ `> (rash 'abc' (jest 'ab'))
3839 ! {1 3}
3940 ! 'syntax-error'
4041 ! exit
@@ -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,20 +65,21 @@ 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--------
7173
72− ~zod/try=> (rush 'I was the world in which I walked, and what I saw' (star (shim 0 200)))
74+ > (rush 'I was the world in which I walked, and what I saw' (star (shim 0 200)))
7375 [~ "I was the world in which I walked, and what I saw"]
74− ~zod/try=> (rush 'abc' (just 'a'))
76+ > (rush 'abc' (just 'a'))
7577 ~
76− ~zod/try=> (rush 'abc' (jest 'abc'))
78+ > (rush 'abc' (jest 'abc'))
7779 [~ 'abc']
78− ~zod/try=> (rush 'abc' (jest 'ac'))
80+ > (rush 'abc' (jest 'ac'))
7981 ~
80− ~zod/try=> (rush 'abc' (jest 'ab'))
82+ > (rush 'abc' (jest 'ab'))
8183 ~
8284
8385
@@ -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,18 +107,19 @@ 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
115− ~zod/try=> (rust "I was the world in which I walked, and what I saw" (star (shim 0 200)))
118+ > (rust "I was the world in which I walked, and what I saw" (star (shim 0 200)))
116119 [~ "I was the world in which I walked, and what I saw"]
117− ~zod/try=> (rust "Or heard or felt came not but from myself;" (star (shim 0 200)))
120+ > (rust "Or heard or felt came not but from myself;" (star (shim 0 200)))
118121 [~ "Or heard or felt came not but from myself;"]
119− ~zod/try=> (rust "And there I found myself more truly and more strange." (jest 'And there I'))
122+ > (rust "And there I found myself more truly and more strange." (jest 'And there I'))
120123 ~
121124
122125
@@ -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 ~)
@@ -154,11 +157,11 @@ Source
154157Examples
155158--------
156159
157− ~zod/try=> (scan "I was the world in which I walked, and what I saw" (star (shim 0 200)))
160+ > (scan "I was the world in which I walked, and what I saw" (star (shim 0 200)))
158161 "I was the world in which I walked, and what I saw"
159− ~zod/try=> (scan "Or heard or felt came not but from myself;" (star (shim 0 200)))
162+ > (scan "Or heard or felt came not but from myself;" (star (shim 0 200)))
160163 "Or heard or felt came not but from myself;"
161− ~zod/try=> (scan "And there I found myself more truly and more strange." (jest 'And there I'))
164+ > (scan "And there I found myself more truly and more strange." (jest 'And there I'))
162165 ! {1 12}
163166 ! 'syntax-error'
164167 ! exit
docs/system/hoon/library/4h.md+135−135
@@ -13,13 +13,13 @@ Source
1313Examples
1414--------
1515
16− ~zod/try=> (scan " " ace)
16+ > (scan " " ace)
1717 ~~.
18− ~zod/try=> `cord`(scan " " ace)
18+ > `cord`(scan " " ace)
1919 ' '
20− ~zod/try=> (ace [[1 1] " "])
20+ > (ace [[1 1] " "])
2121 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q=""]]]]
22− ~zod/try=> (ace [[1 1] " abc "])
22+ > (ace [[1 1] " abc "])
2323 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="abc "]]]]
2424
2525
@@ -39,13 +39,13 @@ Source
3939Examples
4040--------
4141
42− ~zod/try=> (scan "|" bar)
42+ > (scan "|" bar)
4343 ~~~7c.
44− ~zod/try=> `cord`(scan "|" bar)
44+ > `cord`(scan "|" bar)
4545 '|'
46− ~zod/try=> (bar [[1 1] "|"])
46+ > (bar [[1 1] "|"])
4747 [p=[p=1 q=2] q=[~ [p=~~~7c. q=[p=[p=1 q=2] q=""]]]]
48− ~zod/try=> (bar [[1 1] "|="])
48+ > (bar [[1 1] "|="])
4949 [p=[p=1 q=2] q=[~ [p=~~~7c. q=[p=[p=1 q=2] q="="]]]]
5050
5151
@@ -67,15 +67,15 @@ Source
6767Examples
6868--------
6969
70− ~zod/try=> (scan "\\" bas)
70+ > (scan "\\" bas)
7171 ~~~5c.
72− ~zod/try=> `cord`(scan "\\" bas)
72+ > `cord`(scan "\\" bas)
7373 '\'
74− ~zod/try=> (bas [[1 1] "\"])
74+ > (bas [[1 1] "\"])
7575 ~ <syntax error at [1 18]>
76− ~zod/try=> (bas [[1 1] "\\"])
76+ > (bas [[1 1] "\\"])
7777 [p=[p=1 q=2] q=[~ [p=~~~5c. q=[p=[p=1 q=2] q=""]]]]
78− ~zod/try=> (bas [[1 1] "\""])
78+ > (bas [[1 1] "\""])
7979 [p=[p=1 q=1] q=~]
8080
8181
@@ -95,13 +95,13 @@ Source
9595Examples
9696--------
9797
98− ~zod/try=> (scan "$" buc)
98+ > (scan "$" buc)
9999 ~~~24.
100− ~zod/try=> `cord`(scan "$" buc)
100+ > `cord`(scan "$" buc)
101101 '$'
102− ~zod/try=> (buc [[1 1] "$"])
102+ > (buc [[1 1] "$"])
103103 [p=[p=1 q=2] q=[~ [p=~~~24. q=[p=[p=1 q=2] q=""]]]]
104− ~zod/try=> (buc [[1 1] "$%"])
104+ > (buc [[1 1] "$%"])
105105 [p=[p=1 q=2] q=[~ [p=~~~24. q=[p=[p=1 q=2] q="%"]]]]
106106
107107
@@ -121,13 +121,13 @@ Source
121121Examples
122122--------
123123
124− ~zod/try=> (scan "_" cab)
124+ > (scan "_" cab)
125125 ~~~5f.
126− ~zod/try=> `cord`(scan "_" cab)
126+ > `cord`(scan "_" cab)
127127 '_'
128− ~zod/try=> (cab [[1 1] "_"])
128+ > (cab [[1 1] "_"])
129129 [p=[p=1 q=2] q=[~ [p=~~~5f. q=[p=[p=1 q=2] q=""]]]]
130− ~zod/try=> (cab [[1 1] "|_"])
130+ > (cab [[1 1] "|_"])
131131 [p=[p=1 q=1] q=~]
132132
133133
@@ -147,13 +147,13 @@ Source
147147Examples
148148--------
149149
150− ~zod/try=> (scan "%" cen)
150+ > (scan "%" cen)
151151 ~~~25.
152− ~zod/try=> `cord`(scan "%" cen)
152+ > `cord`(scan "%" cen)
153153 '%'
154− ~zod/try=> (cen [[1 1] "%"])
154+ > (cen [[1 1] "%"])
155155 [p=[p=1 q=2] q=[~ [p=~~~25. q=[p=[p=1 q=2] q=""]]]]
156− ~zod/try=> (cen [[1 1] "%^"])
156+ > (cen [[1 1] "%^"])
157157 [p=[p=1 q=2] q=[~ [p=~~~25. q=[p=[p=1 q=2] q="^"]]]]
158158
159159
@@ -173,13 +173,13 @@ Source
173173Examples
174174--------
175175
176− ~zod/try=> (scan ":" col)
176+ > (scan ":" col)
177177 ~~~3a.
178− ~zod/try=> `cord`(scan ":" col)
178+ > `cord`(scan ":" col)
179179 ':'
180− ~zod/try=> (col [[1 1] ":"])
180+ > (col [[1 1] ":"])
181181 [p=[p=1 q=2] q=[~ [p=~~~3a. q=[p=[p=1 q=2] q=""]]]]
182− ~zod/try=> (col [[1 1] ":-"])
182+ > (col [[1 1] ":-"])
183183 [p=[p=1 q=2] q=[~ [p=~~~3a. q=[p=[p=1 q=2] q="-"]]]]
184184
185185
@@ -199,13 +199,13 @@ Source
199199Examples
200200--------
201201
202− ~zod/try=> (scan "," com)
202+ > (scan "," com)
203203 ~~~2c.
204− ~zod/try=> `cord`(scan "," com)
204+ > `cord`(scan "," com)
205205 ','
206− ~zod/try=> (com [[1 1] ","])
206+ > (com [[1 1] ","])
207207 [p=[p=1 q=2] q=[~ [p=~~~2c. q=[p=[p=1 q=2] q=""]]]]
208− ~zod/try=> (com [[1 1] "not com"])
208+ > (com [[1 1] "not com"])
209209 [p=[p=1 q=1] q=~]
210210
211211
@@ -225,15 +225,15 @@ Source
225225Examples
226226--------
227227
228− ~zod/try=> (scan "\"" doq)
228+ > (scan "\"" doq)
229229 ~~~22.
230− ~zod/try=> `cord`(scan "\"" doq)
230+ > `cord`(scan "\"" doq)
231231 '"'
232− ~zod/try=> (doq [[1 1] "\""])
232+ > (doq [[1 1] "\""])
233233 [p=[p=1 q=2] q=[~ [p=~~~22. q=[p=[p=1 q=2] q=""]]]]
234− ~zod/try=> (doq [[1 1] "not successfully parsed"])
234+ > (doq [[1 1] "not successfully parsed"])
235235 [p=[p=1 q=1] q=~]
236− ~zod/try=> (scan "see?" doq)
236+ > (scan "see?" doq)
237237 ! {1 1}
238238 ! 'syntax-error'
239239 ! exit
@@ -255,13 +255,13 @@ Source
255255Examples
256256--------
257257
258− ~zod/try=> (scan "." dot)
258+ > (scan "." dot)
259259 ~~~.
260− ~zod/try=> `cord`(scan "." dot)
260+ > `cord`(scan "." dot)
261261 '.'
262− ~zod/try=> (dot [[1 1] "."])
262+ > (dot [[1 1] "."])
263263 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q=""]]]]
264− ~zod/try=> (dot [[1 1] ".^"])
264+ > (dot [[1 1] ".^"])
265265 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q="^"]]]]
266266
267267
@@ -281,13 +281,13 @@ Source
281281Examples
282282--------
283283
284− ~zod/try=> (scan "/" fas)
284+ > (scan "/" fas)
285285 ~~~2f.
286− ~zod/try=> `cord`(scan "/" fas)
286+ > `cord`(scan "/" fas)
287287 '/'
288− ~zod/try=> (fas [[1 1] "/"])
288+ > (fas [[1 1] "/"])
289289 [p=[p=1 q=2] q=[~ [p=~~~2f. q=[p=[p=1 q=2] q=""]]]]
290− ~zod/try=> (fas [[1 1] "|/"])
290+ > (fas [[1 1] "|/"])
291291 [p=[p=1 q=1] q=~]
292292
293293
@@ -307,15 +307,15 @@ Source
307307Examples
308308--------
309309
310− ~zod/try=> (scan "<" gal)
310+ > (scan "<" gal)
311311 ~~~3c.
312− ~zod/try=> `cord`(scan "<" gal)
312+ > `cord`(scan "<" gal)
313313 '<'
314− ~zod/try=> (gal [[1 1] "<"])
314+ > (gal [[1 1] "<"])
315315 [p=[p=1 q=2] q=[~ [p=~~~3c. q=[p=[p=1 q=2] q=""]]]]
316− ~zod/try=> (gal [[1 1] "<+"])
316+ > (gal [[1 1] "<+"])
317317 [p=[p=1 q=2] q=[~ [p=~~~3c. q=[p=[p=1 q=2] q="+"]]]]
318− ~zod/try=> (gal [[1 1] "+<"])
318+ > (gal [[1 1] "+<"])
319319 [p=[p=1 q=1] q=~]
320320
321321
@@ -335,13 +335,13 @@ Source
335335Examples
336336--------
337337
338− ~zod/try=> (scan ">" gar)
338+ > (scan ">" gar)
339339 ~~~3e.
340− ~zod/try=> `cord`(scan ">" gar)
340+ > `cord`(scan ">" gar)
341341 '>'
342− ~zod/try=> (gar [[1 1] ">"])
342+ > (gar [[1 1] ">"])
343343 [p=[p=1 q=2] q=[~ [p=~~~3e. q=[p=[p=1 q=2] q=""]]]]
344− ~zod/try=> (gar [[1 1] "=>"])
344+ > (gar [[1 1] "=>"])
345345 [p=[p=1 q=1] q=~]
346346
347347
@@ -361,13 +361,13 @@ Source
361361Examples
362362--------
363363
364− ~zod/try=> (scan "#" hax)
364+ > (scan "#" hax)
365365 ~~~23.
366− ~zod/try=> `cord`(scan "#" hax)
366+ > `cord`(scan "#" hax)
367367 '#'
368− ~zod/try=> (hax [[1 1] "#"])
368+ > (hax [[1 1] "#"])
369369 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q=""]]]]
370− ~zod/try=> (hax [[1 1] "#!"])
370+ > (hax [[1 1] "#!"])
371371 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q="!"]]]]
372372
373373
@@ -387,13 +387,13 @@ Source
387387Examples
388388--------
389389
390− ~zod/try=> (scan "-" hep)
390+ > (scan "-" hep)
391391 ~~-
392− ~zod/try=> `cord`(scan "-" hep)
392+ > `cord`(scan "-" hep)
393393 '-'
394− ~zod/try=> (hep [[1 1] "-"])
394+ > (hep [[1 1] "-"])
395395 [p=[p=1 q=2] q=[~ [p=~~- q=[p=[p=1 q=2] q=""]]]]
396− ~zod/try=> (hep [[1 1] ":-"])
396+ > (hep [[1 1] ":-"])
397397 [p=[p=1 q=1] q=~]
398398
399399
@@ -415,13 +415,13 @@ Source
415415Examples
416416--------
417417
418− ~zod/try=> (scan "\{" kel)
418+ > (scan "\{" kel)
419419 ~~~7b.
420− ~zod/try=> `cord`(scan "\{" kel)
420+ > `cord`(scan "\{" kel)
421421 '{'
422− ~zod/try=> (kel [[1 1] "\{"])
422+ > (kel [[1 1] "\{"])
423423 [p=[p=1 q=2] q=[~ [p=~~~7b. q=[p=[p=1 q=2] q=""]]]]
424− ~zod/try=> (kel [[1 1] " \{"])
424+ > (kel [[1 1] " \{"])
425425 [p=[p=1 q=1] q=~]
426426
427427
@@ -443,13 +443,13 @@ Source
443443Examples
444444--------
445445
446− ~zod/try=> (scan "}" ker)
446+ > (scan "}" ker)
447447 ~~~7d.
448− ~zod/try=> `cord`(scan "}" ker)
448+ > `cord`(scan "}" ker)
449449 '}'
450− ~zod/try=> (ker [[1 1] "}"])
450+ > (ker [[1 1] "}"])
451451 [p=[p=1 q=2] q=[~ [p=~~~7d. q=[p=[p=1 q=2] q=""]]]]
452− ~zod/try=> (ker [[1 1] "\{}"])
452+ > (ker [[1 1] "\{}"])
453453 [p=[p=1 q=1] q=~]
454454
455455
@@ -469,13 +469,13 @@ Source
469469Examples
470470--------
471471
472− ~zod/try=> (scan "^" ket)
472+ > (scan "^" ket)
473473 ~~~5e.
474− ~zod/try=> `cord`(scan "^" ket)
474+ > `cord`(scan "^" ket)
475475 '^'
476− ~zod/try=> (ket [[1 1] "^"])
476+ > (ket [[1 1] "^"])
477477 [p=[p=1 q=2] q=[~ [p=~~~5e. q=[p=[p=1 q=2] q=""]]]]
478− ~zod/try=> (ket [[1 1] ".^"])
478+ > (ket [[1 1] ".^"])
479479 [p=[p=1 q=1] q=~]
480480
481481
@@ -494,13 +494,13 @@ Source
494494Examples
495495--------
496496
497− ~zod/try=> (scan "+" lus)
497+ > (scan "+" lus)
498498 ~~~2b.
499− ~zod/try=> `cord`(scan "+" lus)
499+ > `cord`(scan "+" lus)
500500 '+'
501− ~zod/try=> (lus [[1 1] "+"])
501+ > (lus [[1 1] "+"])
502502 [p=[p=1 q=2] q=[~ [p=~~~2b. q=[p=[p=1 q=2] q=""]]]]
503− ~zod/try=> (lus [[1 1] ".+"])
503+ > (lus [[1 1] ".+"])
504504 [p=[p=1 q=1] q=~]
505505
506506
@@ -520,13 +520,13 @@ Source
520520Examples
521521--------
522522
523− ~zod/try=> (scan "&" pam)
523+ > (scan "&" pam)
524524 ~~~26.
525− ~zod/try=> `cord`(scan "&" pam)
525+ > `cord`(scan "&" pam)
526526 '&'
527− ~zod/try=> (pam [[1 1] "&"])
527+ > (pam [[1 1] "&"])
528528 [p=[p=1 q=2] q=[~ [p=~~~26. q=[p=[p=1 q=2] q=""]]]]
529− ~zod/try=> (pam [[1 1] "?&"])
529+ > (pam [[1 1] "?&"])
530530 [p=[p=1 q=1] q=~]
531531
532532
@@ -546,13 +546,13 @@ Source
546546Examples
547547--------
548548
549− ~zod/try=> (scan "@" pat)
549+ > (scan "@" pat)
550550 ~~~4.
551− ~zod/try=> `cord`(scan "@" pat)
551+ > `cord`(scan "@" pat)
552552 '@'
553− ~zod/try=> (pat [[1 1] "@"])
553+ > (pat [[1 1] "@"])
554554 [p=[p=1 q=2] q=[~ [p=~~~4. q=[p=[p=1 q=2] q=""]]]]
555− ~zod/try=> (pat [[1 1] "?@"])
555+ > (pat [[1 1] "?@"])
556556 [p=[p=1 q=1] q=~]
557557
558558
@@ -572,13 +572,13 @@ Source
572572Examples
573573--------
574574
575− ~zod/try=> (scan "(" pel)
575+ > (scan "(" pel)
576576 ~~~28.
577− ~zod/try=> `cord`(scan "(" pel)
577+ > `cord`(scan "(" pel)
578578 '('
579− ~zod/try=> (pel [[1 1] "("])
579+ > (pel [[1 1] "("])
580580 [p=[p=1 q=2] q=[~ [p=~~~28. q=[p=[p=1 q=2] q=""]]]]
581− ~zod/try=> (pel [[1 1] ";("])
581+ > (pel [[1 1] ";("])
582582 [p=[p=1 q=1] q=~]
583583
584584
@@ -598,13 +598,13 @@ Source
598598Examples
599599--------
600600
601− ~zod/try=> (scan ")" per)
601+ > (scan ")" per)
602602 ~~~29.
603− ~zod/try=> `cord`(scan ")" per)
603+ > `cord`(scan ")" per)
604604 ')'
605− ~zod/try=> (per [[1 1] ")"])
605+ > (per [[1 1] ")"])
606606 [p=[p=1 q=2] q=[~ [p=~~~29. q=[p=[p=1 q=2] q=""]]]]
607− ~zod/try=> (per [[1 1] " )"])
607+ > (per [[1 1] " )"])
608608 [p=[p=1 q=1] q=~]
609609
610610
@@ -624,13 +624,13 @@ Source
624624Examples
625625--------
626626
627− ~zod/try=> (scan "[" sel)
627+ > (scan "[" sel)
628628 ~~~5b.
629− ~zod/try=> `cord`(scan "[" sel)
629+ > `cord`(scan "[" sel)
630630 '['
631− ~zod/try=> (sel [[1 1] "["])
631+ > (sel [[1 1] "["])
632632 [p=[p=1 q=2] q=[~ [p=~~~5b. q=[p=[p=1 q=2] q=""]]]]
633− ~zod/try=> (sel [[1 1] "-["])
633+ > (sel [[1 1] "-["])
634634 [p=[p=1 q=1] q=~]
635635
636636
@@ -650,13 +650,13 @@ Source
650650Examples
651651--------
652652
653− ~zod/try=> (scan ";" sem)
653+ > (scan ";" sem)
654654 ~~~3b.
655− ~zod/try=> `cord`(scan ";" sem)
655+ > `cord`(scan ";" sem)
656656 ';'
657− ~zod/try=> (sem [[1 1] ";"])
657+ > (sem [[1 1] ";"])
658658 [p=[p=1 q=2] q=[~ [p=~~~3b. q=[p=[p=1 q=2] q=""]]]]
659− ~zod/try=> (sem [[1 1] " ;"])
659+ > (sem [[1 1] " ;"])
660660 [p=[p=1 q=1] q=~]
661661
662662
@@ -676,13 +676,13 @@ Source
676676Examples
677677--------
678678
679− ~zod/try=> (scan "]" ser)
679+ > (scan "]" ser)
680680 ~~~5d.
681− ~zod/try=> `cord`(scan "]" ser)
681+ > `cord`(scan "]" ser)
682682 ']'
683− ~zod/try=> (ser [[1 1] "]"])
683+ > (ser [[1 1] "]"])
684684 [p=[p=1 q=2] q=[~ [p=~~~5d. q=[p=[p=1 q=2] q=""]]]]
685− ~zod/try=> (ser [[1 1] "[ ]"])
685+ > (ser [[1 1] "[ ]"])
686686 [p=[p=1 q=1] q=~]
687687
688688
@@ -702,13 +702,13 @@ Source
702702Examples
703703--------
704704
705− ~zod/try=> (scan "~" sig)
705+ > (scan "~" sig)
706706 ~~~~
707− ~zod/try=> `cord`(scan "~" sig)
707+ > `cord`(scan "~" sig)
708708 '~'
709− ~zod/try=> (sig [[1 1] "~"])
709+ > (sig [[1 1] "~"])
710710 [p=[p=1 q=2] q=[~ [p=~~~~ q=[p=[p=1 q=2] q=""]]]]
711− ~zod/try=> (sig [[1 1] "?~"])
711+ > (sig [[1 1] "?~"])
712712 [p=[p=1 q=1] q=~]
713713
714714
@@ -729,13 +729,13 @@ Source
729729Examples
730730--------
731731
732− ~zod/try=> (scan "'" soq)
732+ > (scan "'" soq)
733733 ~~~27.
734− ~zod/try=> `cord`(scan "'" soq)
734+ > `cord`(scan "'" soq)
735735 '''
736− ~zod/try=> (soq [[1 1] "'"])
736+ > (soq [[1 1] "'"])
737737 [p=[p=1 q=2] q=[~ [p=~~~27. q=[p=[p=1 q=2] q=""]]]]
738− ~zod/try=> (soq [[1 1] ">'"])
738+ > (soq [[1 1] ">'"])
739739 [p=[p=1 q=1] q=~]
740740
741741
@@ -755,13 +755,13 @@ Source
755755Examples
756756--------
757757
758− ~zod/try=> (scan "*" tar)
758+ > (scan "*" tar)
759759 ~~~2a.
760− ~zod/try=> `cord`(scan "*" tar)
760+ > `cord`(scan "*" tar)
761761 '*'
762− ~zod/try=> (tar [[1 1] "*"])
762+ > (tar [[1 1] "*"])
763763 [p=[p=1 q=2] q=[~ [p=~~~2a. q=[p=[p=1 q=2] q=""]]]]
764− ~zod/try=> (tar [[1 1] ".*"])
764+ > (tar [[1 1] ".*"])
765765 [p=[p=1 q=1] q=~]
766766
767767
@@ -782,13 +782,13 @@ Source
782782Examples
783783--------
784784
785− ~zod/try=> (scan "`" tec)
785+ > (scan "`" tec)
786786 ~~~6.
787− ~zod/try=> `cord`(scan "`" tec)
787+ > `cord`(scan "`" tec)
788788 '`'
789− ~zod/try=> (tec [[1 1] "`"])
789+ > (tec [[1 1] "`"])
790790 [p=[p=1 q=2] q=[~ [p=~~~6. q=[p=[p=1 q=2] q=""]]]]
791− ~zod/try=> (tec [[1 1] " `"])
791+ > (tec [[1 1] " `"])
792792 [p=[p=1 q=1] q=~]
793793
794794
@@ -808,13 +808,13 @@ Source
808808Examples
809809--------
810810
811− ~zod/try=> (scan "=" tis)
811+ > (scan "=" tis)
812812 ~~~3d.
813− ~zod/try=> `cord`(scan "=" tis)
813+ > `cord`(scan "=" tis)
814814 '='
815− ~zod/try=> (tis [[1 1] "="])
815+ > (tis [[1 1] "="])
816816 [p=[p=1 q=2] q=[~ [p=~~~3d. q=[p=[p=1 q=2] q=""]]]]
817− ~zod/try=> (tis [[1 1] "|="])
817+ > (tis [[1 1] "|="])
818818 [p=[p=1 q=1] q=~]
819819
820820
@@ -834,13 +834,13 @@ Source
834834Examples
835835--------
836836
837− ~zod/try=> (scan "?" wut)
837+ > (scan "?" wut)
838838 ~~~3f.
839− ~zod/try=> `cord`(scan "?" wut)
839+ > `cord`(scan "?" wut)
840840 '?'
841− ~zod/try=> (wut [[1 1] "?"])
841+ > (wut [[1 1] "?"])
842842 [p=[p=1 q=2] q=[~ [p=~~~3f. q=[p=[p=1 q=2] q=""]]]]
843− ~zod/try=> (wut [[1 1] ".?"])
843+ > (wut [[1 1] ".?"])
844844 [p=[p=1 q=1] q=~]
845845
846846
@@ -860,13 +860,13 @@ Source
860860Examples
861861--------
862862
863− ~zod/try=> (scan "!" zap)
863+ > (scan "!" zap)
864864 ~~~21.
865− ~zod/try=> `cord`(scan "!" zap)
865+ > `cord`(scan "!" zap)
866866 '!'
867− ~zod/try=> (zap [[1 1] "!"])
867+ > (zap [[1 1] "!"])
868868 [p=[p=1 q=2] q=[~ [p=~~~21. q=[p=[p=1 q=2] q=""]]]]
869− ~zod/try=> (zap [[1 1] "?!"])
869+ > (zap [[1 1] "?!"])
870870 [p=[p=1 q=1] q=~]
871871
872872
docs/system/hoon/library/4j.md+193−192
@@ -14,7 +14,7 @@ Source
1414Examples
1515--------
1616
17− ~zod/try=> ab
17+ > ab
1818 <36.ecc 414.gly 100.xkc 1.ypj %164>
1919
2020------------------------------------------------------------------------
@@ -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-------
@@ -43,11 +43,11 @@ Source
4343Examples
4444--------
4545
46− ~zod/try=> (scan "07" bix:ab)
46+ > (scan "07" bix:ab)
4747 q=7
48− ~zod/try=> (scan "51" bix:ab)
48+ > (scan "51" bix:ab)
4949 q=81
50− ~zod/try=> (scan "a3" bix:ab)
50+ > (scan "a3" bix:ab)
5151 q=163
5252
5353------------------------------------------------------------------------
@@ -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
@@ -77,9 +77,9 @@ Source
7777Examples
7878--------
7979
80− ~zod/try=> (scan "doznec" hif:ab)
80+ > (scan "doznec" hif:ab)
8181 q=256
82− ~zod/try=> (scan "pittyp" hif:ab)
82+ > (scan "pittyp" hif:ab)
8383 q=48.626
8484
8585------------------------------------------------------------------------
@@ -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,17 +105,17 @@ 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
112112--------
113113
114− ~zod/try=> (scan "pittyp-pittyp" huf:ab)
114+ > (scan "pittyp-pittyp" huf:ab)
115115 328.203.557
116− ~zod/try=> (scan "tasfyn-partyv" huf:ab)
116+ > (scan "tasfyn-partyv" huf:ab)
117117 65.792
118− ~zod/try=> `@ux`(scan "tasfyn-partyv" huf:ab)
118+ > `@ux`(scan "tasfyn-partyv" huf:ab)
119119 0x1.0100
120120
121121------------------------------------------------------------------------
@@ -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--------
@@ -145,9 +145,9 @@ Source
145145Examples
146146--------
147147
148− ~zod/try=> (scan "sondel-forsut-tillyn-nillyt" hyf:ab)
148+ > (scan "sondel-forsut-tillyn-nillyt" hyf:ab)
149149 q=365.637.097.828.335.095
150− ~zod/try=> `@u`~sondel-forsut-tillyn-nillyt
150+ > `@u`~sondel-forsut-tillyn-nillyt
151151 365.637.097.828.335.095
152152
153153------------------------------------------------------------------------
@@ -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--------
@@ -176,14 +176,14 @@ Source
176176Examples
177177--------
178178
179− ~zod/try=> (scan "a" pev:ab)
179+ > (scan "a" pev:ab)
180180 q=10
181− ~zod/try=> (scan "290j" pev:ab)
181+ > (scan "290j" pev:ab)
182182 q=74.771
183− ~zod/try=> (scan "123456" pev:ab)
183+ > (scan "123456" pev:ab)
184184 ! {1 6}
185185 ! exit
186− ~zod/try=> (scan "090j" pev:ab)
186+ > (scan "090j" pev:ab)
187187 ~ <syntax error at [1 11]>
188188
189189------------------------------------------------------------------------
@@ -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--------
@@ -212,16 +212,16 @@ Source
212212Examples
213213--------
214214
215− ~zod/try=> (scan "Q" pew:ab)
215+ > (scan "Q" pew:ab)
216216 q=52
217− ~zod/try=> (scan "aQ~9" pew:ab)
217+ > (scan "aQ~9" pew:ab)
218218 q=2.838.473
219− ~zod/try=> `@`0waQ~9
219+ > `@`0waQ~9
220220 2.838.473
221− ~zod/try=> (scan "123456" pew:ab)
221+ > (scan "123456" pew:ab)
222222 ! {1 6}
223223 ! exit
224− ~zod/try=> (scan "012345" pew:ab)
224+ > (scan "012345" pew:ab)
225225 ! {1 1}
226226 ! exit
227227
@@ -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-------
@@ -247,9 +247,9 @@ Source
247247Examples
248248--------
249249
250− ~zod/try=> (scan "10b3l" piv:ab)
250+ > (scan "10b3l" piv:ab)
251251 q=1.059.957
252− ~zod/try=> (scan "1" piv:ab)
252+ > (scan "1" piv:ab)
253253 ! {1 2}
254254 ! exit
255255
@@ -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
@@ -277,9 +275,9 @@ Source
277275Examples
278276--------
279277
280− ~zod/try=> (scan "2C-pZ" piw:ab)
278+ > (scan "2C-pZ" piw:ab)
281279 q=43.771.517
282− ~zod/try=> (scan "2" piv:ab)
280+ > (scan "2" piv:ab)
283281 ! {1 2}
284282 ! exit
285283
@@ -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
@@ -306,16 +304,16 @@ Source
306304Examples
307305--------
308306
309− ~zod/try=> (scan "1" qeb:ab)
307+ > (scan "1" qeb:ab)
310308 q=1
311− ~zod/try=> (scan "101" qeb:ab)
309+ > (scan "101" qeb:ab)
312310 q=5
313− ~zod/try=> (scan "1111" qeb:ab)
311+ > (scan "1111" qeb:ab)
314312 q=15
315− ~zod/try=> (scan "11111" qeb:ab)
313+ > (scan "11111" qeb:ab)
316314 ! {1 5}
317315 ! exit
318− ~zod/try=> (scan "01" qeb:ab)
316+ > (scan "01" qeb:ab)
319317 ! {1 1}
320318 ! exit
321319
@@ -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
@@ -342,14 +340,14 @@ Source
342340Examples
343341--------
344342
345− ~zod/try=> (scan "ca" qex:ab)
343+ > (scan "ca" qex:ab)
346344 q=202
347− ~zod/try=> (scan "18ac" qex:ab)
345+ > (scan "18ac" qex:ab)
348346 q=6.316
349− ~zod/try=> (scan "18acc" qex:ab)
347+ > (scan "18acc" qex:ab)
350348 ! {1 5}
351349 ! exit
352− ~zod/try=> (scan "08ac" qex:ab)
350+ > (scan "08ac" qex:ab)
353351 ! {1 1}
354352 ! exit
355353
@@ -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-------
@@ -375,11 +373,11 @@ Source
375373Examples
376374--------
377375
378− ~zod/try=> (scan "0001" qib:ab)
376+ > (scan "0001" qib:ab)
379377 q=1
380− ~zod/try=> (scan "0100" qib:ab)
378+ > (scan "0100" qib:ab)
381379 q=4
382− ~zod/try=> (scan "110" qib:ab)
380+ > (scan "110" qib:ab)
383381 ! {1 4}
384382 ! exit
385383
@@ -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-------
@@ -405,11 +403,11 @@ Source
405403Examples
406404--------
407405
408− ~zod/try=> (scan "0100" qix:ab)
406+ > (scan "0100" qix:ab)
409407 q=256
410− ~zod/try=> (scan "10ff" qix:ab)
408+ > (scan "10ff" qix:ab)
411409 q=4.351
412− ~zod/try=> (scan "0" qix:ab)
410+ > (scan "0" qix:ab)
413411 ! {1 2}
414412 ! exit
415413
@@ -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-------
@@ -435,12 +433,12 @@ Source
435433Examples
436434--------
437435
438− ~zod/try=> (scan "1" seb:ab)
436+ > (scan "1" seb:ab)
439437 1
440− ~zod/try=> (scan "0" seb:ab)
438+ > (scan "0" seb:ab)
441439 ! ~zod/try/~2014.10.23..22.34.21..bfdd/:<[1 1].[1 18]>
442440 ! {1 1}
443− ~zod/try=> (scan "2" seb:ab)
441+ > (scan "2" seb:ab)
444442 ! ~zod/try/~2014.10.23..22.34.29..d399/:<[1 1].[1 18]>
445443 ! {1 1}
446444
@@ -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,14 +459,14 @@ 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--------
468466
469− ~zod/try=> (scan "5" sed:ab)
467+ > (scan "5" sed:ab)
470468 5
471− ~zod/try=> (scan "0" sed:ab)
469+ > (scan "0" sed:ab)
472470 ! {1 1}
473471 ! exit
474472
@@ -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-------
@@ -494,7 +492,7 @@ Source
494492Examples
495493--------
496494
497− ~zod/try=> (scan "c" sev:ab)
495+ > (scan "c" sev:ab)
498496 12
499497 ~zod/socialnet=> (scan "0" sev:ab)
500498 ! {1 1}
@@ -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-------
@@ -522,9 +520,9 @@ Source
522520Examples
523521--------
524522
525− ~zod/try=> (scan "M" sew:ab)
523+ > (scan "M" sew:ab)
526524 48
527− ~zod/try=> (scan "0" sew:ab)
525+ > (scan "0" sew:ab)
528526 ! {1 1}
529527 ! exit
530528
@@ -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-------
@@ -550,9 +548,9 @@ Source
550548Examples
551549--------
552550
553− ~zod/try=> (scan "e" sex:ab)
551+ > (scan "e" sex:ab)
554552 14
555− ~zod/try=> (scan "0" sex:ab)
553+ > (scan "0" sex:ab)
556554 ! {1 1}
557555 ! exit
558556
@@ -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,12 +571,12 @@ 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--------
580578
581− ~zod/try=> (scan "1" sib:ab)
579+ > (scan "1" sib:ab)
582580 1
583581 ~zod/socialnet=> (scan "0" sib:ab)
584582 0
@@ -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,12 +598,12 @@ 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--------
607605
608− ~zod/try=> (scan "5" sid:ab)
606+ > (scan "5" sid:ab)
609607 5
610608
611609------------------------------------------------------------------------
@@ -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-------
@@ -630,7 +628,7 @@ Source
630628Examples
631629--------
632630
633− ~zod/try=> (scan "c" siv:ab)
631+ > (scan "c" siv:ab)
634632 12
635633
636634------------------------------------------------------------------------
@@ -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-------
@@ -655,7 +653,7 @@ Source
655653Examples
656654--------
657655
658− ~zod/try=> (scan "M" siw:ab)
656+ > (scan "M" siw:ab)
659657 48
660658
661659------------------------------------------------------------------------
@@ -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-------
@@ -680,7 +678,7 @@ Source
680678Examples
681679--------
682680
683− ~zod/try=> (scan "e" six:ab)
681+ > (scan "e" six:ab)
684682 14
685683
686684------------------------------------------------------------------------
@@ -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,12 +698,12 @@ 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--------
707705
708− ~zod/try=> (scan "c" sov:ab)
706+ > (scan "c" sov:ab)
709707 12
710708
711709------------------------------------------------------------------------
@@ -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 ==
@@ -735,7 +733,7 @@ Source
735733Examples
736734--------
737735
738− ~zod/try=> (scan "M" sow:ab)
736+ > (scan "M" sow:ab)
739737 48
740738
741739------------------------------------------------------------------------
@@ -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,12 +753,12 @@ 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--------
762760
763− ~zod/try=> (scan "e" sox:ab)
761+ > (scan "e" sox:ab)
764762 14
765763
766764------------------------------------------------------------------------
@@ -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
@@ -786,13 +784,13 @@ Source
786784Examples
787785--------
788786
789− ~zod/try=> (scan "21" ted:ab)
787+ > (scan "21" ted:ab)
790788 q=21
791− ~zod/try=> (scan "214" ted:ab)
789+ > (scan "214" ted:ab)
792790 q=214
793− ~zod/try=> (scan "2140" ted:ab)
791+ > (scan "2140" ted:ab)
794792 {1 4}
795− ~zod/try=> (scan "0" ted:ab)
793+ > (scan "0" ted:ab)
796794 ! {1 1}
797795 ! exit
798796
@@ -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,14 +812,14 @@ Produces
814812Source
815813------
816814
817− ++ tip (sear |=(a=@ (ins:po a)) til)
815+ ++ tip (sear |=(a/@ (ins:po a)) til)
818816
819817Examples
820818--------
821819
822− ~zod/try=> (scan "doz" tip:ab)
820+ > (scan "doz" tip:ab)
823821 0
824− ~zod/try=> (scan "pit" tip:ab)
822+ > (scan "pit" tip:ab)
825823 242
826824
827825------------------------------------------------------------------------
@@ -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,14 +840,14 @@ Produces
842840Source
843841------
844842
845− ++ tiq (sear |=(a=@ (ind:po a)) til)
843+ ++ tiq (sear |=(a/@ (ind:po a)) til)
846844
847845Examples
848846--------
849847
850− ~zod/try=> (scan "zod" tiq:ab)
848+ > (scan "zod" tiq:ab)
851849 0
852− ~zod/try=> (scan "nec" tiq:ab)
850+ > (scan "nec" tiq:ab)
853851 1
854852
855853------------------------------------------------------------------------
@@ -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-------
@@ -874,9 +872,9 @@ Source
874872Examples
875873--------
876874
877− ~zod/try=> (scan "013" tid:ab)
875+ > (scan "013" tid:ab)
878876 q=13
879− ~zod/try=> (scan "01" tid:ab)
877+ > (scan "01" tid:ab)
880878 ! {1 3}
881879 ! exit
882880
@@ -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-------
@@ -902,11 +900,11 @@ Source
902900Examples
903901--------
904902
905− ~zod/try=> (scan "mer" til:ab)
903+ > (scan "mer" til:ab)
906904 q=7.497.069
907− ~zod/try=> `@t`(scan "mer" til:ab)
905+ > `@t`(scan "mer" til:ab)
908906 'mer'
909− ~zod/try=> (scan "me" til:ab)
907+ > (scan "me" til:ab)
910908 ! {1 3}
911909 ! exit
912910
@@ -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,15 +926,15 @@ 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
935933--------
936934
937− ~zod/try=> `@ta`(scan "asa-lom_tak" urs:ab)
935+ > `@ta`(scan "asa-lom_tak" urs:ab)
938936 ~.asa-lom_tak
939− ~zod/try=> `@t`(scan "asa-lom_tak" urs:ab)
937+ > `@t`(scan "asa-lom_tak" urs:ab)
940938 'asa-lom_tak'
941939
942940------------------------------------------------------------------------
@@ -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,13 +956,13 @@ 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
965963--------
966964
967− ~zod/try=> `@t`(scan "asa-lom.t0k" urt:ab)
965+ > `@t`(scan "asa-lom.t0k" urt:ab)
968966 'asa-lom.t0k'
969967
970968------------------------------------------------------------------------
@@ -990,9 +988,9 @@ Source
990988Examples
991989--------
992990
993− ~zod/try=> (scan "\\0a" voy:ab)
991+ > (scan "\\0a" voy:ab)
994992 q=10
995− ~zod/try=> (scan "\\'" voy:ab)
993+ > (scan "\\'" voy:ab)
996994 q=39
997995
998996------------------------------------------------------------------------
@@ -1018,7 +1016,7 @@ Source
10181016Examples
10191017--------
10201018
1021− ~zod/try=> ag
1019+ > ag
10221020 <14.vpu 414.mof 100.xkc 1.ypj %164>
10231021
10241022------------------------------------------------------------------------
@@ -1035,17 +1033,18 @@ 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--------
10471046
1048− ~zod/try=> (scan "202" (star (ape:ag (cold 2 (just '2')))))
1047+ > (scan "202" (star (ape:ag (cold 2 (just '2')))))
10491048 ~[2 0 2]
10501049
10511050------------------------------------------------------------------------
@@ -1070,7 +1069,7 @@ Source
10701069Examples
10711070--------
10721071
1073− ~zod/try=> (scan "10.0110" bay:ag)
1072+ > (scan "10.0110" bay:ag)
10741073 q=38
10751074
10761075------------------------------------------------------------------------
@@ -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-------
@@ -1096,9 +1095,9 @@ Source
10961095Examples
10971096--------
10981097
1099− ~zod/try=> (scan "0.0.ea.3e6c.0.0.0.0" bip:ag)
1098+ > (scan "0.0.ea.3e6c.0.0.0.0" bip:ag)
11001099 q=283.183.420.760.121.105.516.068.864
1101− ~zod/try=> `@is`(scan "0.0.ea.3e6c.0.0.0.0" bip:ag)
1100+ > `@is`(scan "0.0.ea.3e6c.0.0.0.0" bip:ag)
11021101 .0.0.ea.3e6c.0.0.0.0
11031102
11041103------------------------------------------------------------------------
@@ -1120,12 +1119,13 @@ Source
11201119
11211120 ++ dem (ape (bass 1.000 ;~(plug ted:ab (star ;~(pfix dog tid:ab)))))
11221121
1122+
11231123Examples
11241124--------
11251125
1126− ~zod/try=> (scan "52" dem:ag)
1126+ > (scan "52" dem:ag)
11271127 q=52
1128− ~zod/try=> (scan "13.507" dem:ag)
1128+ > (scan "13.507" dem:ag)
11291129 q=13.507
11301130
11311131------------------------------------------------------------------------
@@ -1150,9 +1150,9 @@ Source
11501150Examples
11511151--------
11521152
1153− ~zod/try=> (scan "52" dim:ag)
1153+ > (scan "52" dim:ag)
11541154 q=52
1155− ~zod/try=> (scan "013507" dim:ag)
1155+ > (scan "013507" dim:ag)
11561156 ! {1 2}
11571157 ! exit
11581158
@@ -1178,11 +1178,11 @@ Source
11781178Examples
11791179--------
11801180
1181− ~zod/try=> (scan "52" dum:ag)
1181+ > (scan "52" dum:ag)
11821182 q=52
1183− ~zod/try=> (scan "0000052" dum:ag)
1183+ > (scan "0000052" dum:ag)
11841184 q=52
1185− ~zod/try=> (scan "13507" dim:ag)
1185+ > (scan "13507" dim:ag)
11861186 q=13.507
11871187
11881188------------------------------------------------------------------------
@@ -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-------
@@ -1212,19 +1212,19 @@ Source
12121212Examples
12131213--------
12141214
1215− ~zod/try=> (scan "zod" fed:ag)
1215+ > (scan "zod" fed:ag)
12161216 0
1217− ~zod/try=> (scan "nec" fed:ag)
1217+ > (scan "nec" fed:ag)
12181218 1
1219− ~zod/try=> (scan "sondel" fed:ag)
1219+ > (scan "sondel" fed:ag)
12201220 9.636
1221− ~zod/try=> ~tillyn-nillyt
1221+ > ~tillyn-nillyt
12221222 ~tillyn-nillyt
1223− ~zod/try=> (scan "tillyn-nillyt" fed:ag)
1223+ > (scan "tillyn-nillyt" fed:ag)
12241224 3.569.565.175
1225− ~zod/try=> (scan "tillyn-nillyt-tasfyn-partyv" fed:ag)
1225+ > (scan "tillyn-nillyt-tasfyn-partyv" fed:ag)
12261226 15.331.165.687.565.582.592
1227− ~zod/try=> (scan "tillyn-nillyt-tasfyn-partyv--novweb-talrud-talmud-sonfyr" fed:ag)
1227+ > (scan "tillyn-nillyt-tasfyn-partyv--novweb-talrud-talmud-sonfyr" fed:ag)
12281228 282.810.089.790.159.633.869.501.053.313.363.681.181
12291229
12301230------------------------------------------------------------------------
@@ -1249,13 +1249,13 @@ Source
12491249Examples
12501250--------
12511251
1252− ~zod/try=> (scan "4" hex:ag)
1252+ > (scan "4" hex:ag)
12531253 q=4
1254− ~zod/try=> (scan "1a" hex:ag)
1254+ > (scan "1a" hex:ag)
12551255 q=26
1256− ~zod/try=> (scan "3.ac8d" hex:ag)
1256+ > (scan "3.ac8d" hex:ag)
12571257 q=240.781
1258− ~zod/try=> `@ux`(scan "3.ac8d" hex:ag)
1258+ > `@ux`(scan "3.ac8d" hex:ag)
12591259 0x3.ac8d
12601260
12611261------------------------------------------------------------------------
@@ -1281,11 +1281,11 @@ Source
12811281Examples
12821282--------
12831283
1284− ~zod/try=> (scan "127.0.0.1" lip:ag)
1284+ > (scan "127.0.0.1" lip:ag)
12851285 q=2.130.706.433
1286− ~zod/try=> `@if`(scan "127.0.0.1" lip:ag)
1286+ > `@if`(scan "127.0.0.1" lip:ag)
12871287 .127.0.0.1
1288− ~zod/try=> `@if`(scan "8.8.8.8" lip:ag)
1288+ > `@if`(scan "8.8.8.8" lip:ag)
12891289 .8.8.8.8
12901290
12911291------------------------------------------------------------------------
@@ -1310,7 +1310,7 @@ Source
13101310Examples
13111311--------
13121312
1313− ~zod/try=> (scan "e2.ol4pm" viz:ag)
1313+ > (scan "e2.ol4pm" viz:ag)
13141314 q=15.125.353.270
13151315
13161316------------------------------------------------------------------------
@@ -1335,7 +1335,7 @@ Source
13351335Examples
13361336--------
13371337
1338− ~zod/try=> (scan "e2ol4pm" vum:ag)
1338+ > (scan "e2ol4pm" vum:ag)
13391339 q=15.125.353.270
13401340
13411341------------------------------------------------------------------------
@@ -1362,7 +1362,7 @@ Source
13621362Examples
13631363--------
13641364
1365− ~zod/try=> (scan "e2O.l4Xpm" wiz:ag)
1365+ > (scan "e2O.l4Xpm" wiz:ag)
13661366 q=61.764.130.813.526
13671367
13681368***
@@ -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,20 +1380,20 @@ 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--------
13951395
1396− ~zod/try=> ~(. mu 0x20e5 0x5901)
1396+ > ~(. mu 0x20e5 0x5901)
13971397 <3.sjm [[@ux @ux] <414.hhh 100.xkc 1.ypj %164>]>
13981398
13991399------------------------------------------------------------------------
@@ -1412,19 +1412,20 @@ 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
1427− ~zod/try=> `[@ux @ux]`~(zag mu 0x20e0 0x201)
1428+ > `[@ux @ux]`~(zag mu 0x20e0 0x201)
14281429 [0x22e1 0x201]
14291430
14301431------------------------------------------------------------------------
@@ -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------
@@ -1456,7 +1457,7 @@ Source
14561457Examples
14571458--------
14581459
1459− ~zod/try=> `[@ux @ux]`~(zig mu 0x2f46 0x1042)
1460+ > `[@ux @ux]`~(zig mu 0x2f46 0x1042)
14601461 [0x1f04 0x1042]
14611462
14621463------------------------------------------------------------------------
@@ -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------
@@ -1486,7 +1487,7 @@ Source
14861487Examples
14871488--------
14881489
1489− ~zod/try=> `@ux`~(zug mu 0x10e1 0xfa)
1490+ > `@ux`~(zug mu 0x10e1 0xfa)
14901491 0x10e1.00fa
14911492
14921493
@@ -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,18 +1506,18 @@ 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--------
15181519
1519− ~zod/try=> ~(. ne 20)
1520+ > ~(. ne 20)
15201521 <4.gut [@ud <414.hhh 100.xkc 1.ypj %164>]>
15211522
15221523------------------------------------------------------------------------
@@ -1533,7 +1534,7 @@ Accepts
15331534Produces
15341535--------
15351536
1536−`tig` is an [`atom`]().
1537+`tig` is an `atom`.
15371538
15381539Source
15391540------
@@ -1543,7 +1544,7 @@ Source
15431544Examples
15441545--------
15451546
1546− ~zod/try=> `@t`~(d ne 7)
1547+ > `@t`~(d ne 7)
15471548 '7'
15481549
15491550------------------------------------------------------------------------
@@ -1560,7 +1561,7 @@ Accepts
15601561Produces
15611562--------
15621563
1563−`tig` is an [`atom`]().
1564+`tig` is an `atom`.
15641565
15651566Source
15661567------
@@ -1570,9 +1571,9 @@ Source
15701571Examples
15711572--------
15721573
1573− ~zod/try=> `@t`~(x ne 7)
1574+ > `@t`~(x ne 7)
15741575 '7'
1575− ~zod/try=> `@t`~(x ne 14)
1576+ > `@t`~(x ne 14)
15761577 'e'
15771578
15781579------------------------------------------------------------------------
@@ -1597,11 +1598,11 @@ Source
15971598Examples
15981599--------
15991600
1600− ~zod/try=> `@t`~(v ne 7)
1601+ > `@t`~(v ne 7)
16011602 '7'
1602− ~zod/try=> `@t`~(v ne 14)
1603+ > `@t`~(v ne 14)
16031604 'e'
1604− ~zod/try=> `@t`~(v ne 25)
1605+ > `@t`~(v ne 25)
16051606 'p'
16061607
16071608------------------------------------------------------------------------
@@ -1618,7 +1619,7 @@ Accepts
16181619Produces
16191620--------
16201621
1621−`tig` is an [`atom`]().
1622+`tig` is an `atom`.
16221623
16231624Source
16241625------
@@ -1630,19 +1631,19 @@ Source
16301631Examples
16311632--------
16321633
1633− ~zod/try=> `@t`~(w ne 7)
1634+ > `@t`~(w ne 7)
16341635 '7'
1635− ~zod/try=> `@t`~(w ne 14)
1636+ > `@t`~(w ne 14)
16361637 'e'
1637− ~zod/try=> `@t`~(w ne 25)
1638+ > `@t`~(w ne 25)
16381639 'p'
1639− ~zod/try=> `@t`~(w ne 52)
1640+ > `@t`~(w ne 52)
16401641 'Q'
1641− ~zod/try=> `@t`~(w ne 61)
1642+ > `@t`~(w ne 61)
16421643 'Z'
1643− ~zod/try=> `@t`~(w ne 63)
1644+ > `@t`~(w ne 63)
16441645 '~'
1645− ~zod/try=> `@t`~(w ne 62)
1646+ > `@t`~(w ne 62)
16461647 '-'
16471648
16481649
docs/system/hoon/library/4k.md+383−457
@@ -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+ > < 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+ > (~(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+ > ~(rent co %$ %ux 200)
87+ ~.0xc8
88+ > `@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+ > ~(rend co ~ %ux 200)
242+ "0xc8"
243+ > ~(rend co %many ~[[%$ ux+200] [%$ p+40]])
244+ "._0xc8_~~tem__"
245+ > ~(rend co ~ %p 32.819)
246+ "~pillyt"
247+ > ~(rend co ~ %ux 18)
248+ "0x12"
249+ > ~(rend co [~ p=[p=%if q=0x7f00.0001]])
250+ ".127.0.0.1"
251+ > `@ux`.127.0.0.1
252+ 2.130.706.433
253+ > ~(rend co %many ~[[~ %ud 20] [~ %uw 133] [~ %tas 'sam']])
254+ "._20_0w25_sam__"
255+ > ~(rend co %blob [1 1])
256+ "~0ph"
257+ > ~0ph
258+ [1 1]
259+ > `@uv`(jam [1 1])
260+ 0vph
261+
262+
263+
264+***
2265### `++alf`
3266
4267Alphabetic characters
@@ -13,11 +276,11 @@ Source
13276Examples
14277--------
15278
16− ~zod/try=> (scan "a" alf)
279+ > (scan "a" alf)
17280 ~~a
18− ~zod/try=> (scan "A" alf)
281+ > (scan "A" alf)
19282 ~~~41.
20− ~zod/try=> (scan "AaBbCc" (star alf))
283+ > (scan "AaBbCc" (star alf))
21284 "AaBbCc"
22285
23286
@@ -37,11 +300,11 @@ Source
37300Examples
38301--------
39302
40− ~zod/try=> (scan "0" aln)
303+ > (scan "0" aln)
41304 ~~0
42− ~zod/try=> (scan "alf42" (star aln))
305+ > (scan "alf42" (star aln))
43306 "alf42"
44− ~zod/try=> (scan "0123456789abcdef" (star aln))
307+ > (scan "0123456789abcdef" (star aln))
45308 "0123456789abcdef"
46309
47310
@@ -61,11 +324,11 @@ Source
61324Examples
62325--------
63326
64− ~zod/try=> (scan "7" alp)
327+ > (scan "7" alp)
65328 ~~7
66− ~zod/try=> (scan "s" alp)
329+ > (scan "s" alp)
67330 ~~s
68− ~zod/try=> (scan "123abc-" (star alp))
331+ > (scan "123abc-" (star alp))
69332 "123abc-"
70333
71334
@@ -86,9 +349,9 @@ Source
86349Examples
87350--------
88351
89− ~zod/try=> (scan "-" bet)
352+ > (scan "-" bet)
90353 2
91− ~zod/try=> (scan "+" bet)
354+ > (scan "+" bet)
92355 3
93356
94357
@@ -108,13 +371,13 @@ Source
108371Examples
109372--------
110373
111− ~zod/try=> (scan "0000" bin)
374+ > (scan "0000" bin)
112375 0
113− ~zod/try=> (scan "0001" bin)
376+ > (scan "0001" bin)
114377 1
115− ~zod/try=> (scan "0010" bin)
378+ > (scan "0010" bin)
116379 2
117− ~zod/try=> (scan "100000001111" bin)
380+ > (scan "100000001111" bin)
118381 2.063
119382
120383
@@ -134,15 +397,15 @@ Source
134397Examples
135398--------
136399
137− ~zod/try=> (scan "0" but)
400+ > (scan "0" but)
138401 0
139− ~zod/try=> (scan "1" but)
402+ > (scan "1" but)
140403 1
141− ~zod/try=> (scan "01" but)
404+ > (scan "01" but)
142405 ! {1 2}
143406 ! 'syntax-error'
144407 ! exit
145− ~zod/try=> (scan "01" (star but))
408+ > (scan "01" (star but))
146409 ~[0 1]
147410
148411
@@ -162,15 +425,15 @@ Source
162425Examples
163426--------
164427
165− ~zod/try=> (scan "1" cit)
428+ > (scan "1" cit)
166429 1
167− ~zod/try=> (scan "7" cit)
430+ > (scan "7" cit)
168431 7
169− ~zod/try=> (scan "8" cit)
432+ > (scan "8" cit)
170433 ! {1 1}
171434 ! 'syntax-error'
172435 ! exit
173− ~zod/try=> (scan "60" (star cit))
436+ > (scan "60" (star cit))
174437 ~[6 0]
175438
176439
@@ -190,13 +453,13 @@ Source
190453Examples
191454--------
192455
193− ~zod/try=> (scan "7" dem)
456+ > (scan "7" dem)
194457 7
195− ~zod/try=> (scan "42" dem)
458+ > (scan "42" dem)
196459 42
197− ~zod/try=> (scan "150000000" dem)
460+ > (scan "150000000" dem)
198461 150.000.000
199− ~zod/try=> (scan "12456" dem)
462+ > (scan "12456" dem)
200463 12.456
201464
202465
@@ -216,11 +479,11 @@ Source
216479Examples
217480--------
218481
219− ~zod/try=> (scan "7" dit)
482+ > (scan "7" dit)
220483 7
221− ~zod/try=> (scan "42" (star dit))
484+ > (scan "42" (star dit))
222485 ~[4 2]
223− ~zod/try=> (scan "26000" (star dit))
486+ > (scan "26000" (star dit))
224487 ~[2 6 0 0 0]
225488
226489
@@ -240,10 +503,10 @@ Source
240503Examples
241504--------
242505
243− /~zod/try=> 1.234.
506+ /> 1.234.
244507 703
245508 1.234.703
246− ~zod/try=> (scan "a. " ;~(pfix alf dog))
509+ > (scan "a. " ;~(pfix alf dog))
247510 [~~~. ~]
248511
249512
@@ -263,14 +526,14 @@ Source
263526Examples
264527--------
265528
266− /~zod/try=> ~nopfel-botduc-nilnev-dolfyn--haspub-natlun-lodmur-holtyd
529+ /> ~nopfel-botduc-nilnev-dolfyn--haspub-natlun-lodmur-holtyd
267530 ~nopfel-botduc-nilnev-dolfyn--haspub-natlun-lodmur-holtyd
268− /~zod/try=> ~nopfel-botduc-nilnev-dolfyn--
531+ /> ~nopfel-botduc-nilnev-dolfyn--
269532 haspub-natlun-lodmur-holtyd
270533 ~nopfel-botduc-nilnev-dolfyn--haspub-natlun-lodmur-holtyd
271− ~zod/try=> (scan "--" doh)
534+ > (scan "--" doh)
272535 [[~~- ~~-] ~]
273− ~zod/try=> (scan "-- " doh)
536+ > (scan "-- " doh)
274537 [[~~- ~~-] ~]
275538
276539
@@ -290,9 +553,9 @@ Source
290553Examples
291554--------
292555
293− ~zod/try=> (scan "--" dun)
556+ > (scan "--" dun)
294557 ~
295− ~zod/try=> (dun [[1 1] "--"])
558+ > (dun [[1 1] "--"])
296559 [p=[p=1 q=3] q=[~ u=[p=~ q=[p=[p=1 q=3] q=""]]]]
297560
298561
@@ -313,9 +576,9 @@ Source
313576Examples
314577--------
315578
316− ~zod/try=> (scan "==" duz)
579+ > (scan "==" duz)
317580 ~
318− ~zod/try=> (duz [[1 1] "== |=..."])
581+ > (duz [[1 1] "== |=..."])
319582 [p=[p=1 q=3] q=[~ u=[p=~ q=[p=[p=1 q=3] q=" |=..."]]]]
320583
321584
@@ -336,19 +599,19 @@ Source
336599Examples
337600--------
338601
339− /~zod/try=> ^- * :: show spaces
602+ /> ^- * :: show spaces
340603 """
341604 -
342605 -
343606 -
344607 """
345608 [32 32 32 45 10 32 45 10 32 32 45 0]
346− /~zod/try=> ^- *
609+ /> ^- *
347610 """
348611
349612 """
350613 [32 32 32 10 32 10 32 32 0]
351− /~zod/try=> ^- (list ,@)
614+ /> ^- (list ,@)
352615 %- scan :_ (star gah)
353616 """
354617
@@ -434,9 +697,9 @@ Examples
434697--------
435698characters bas and fas.
436699
437− ~zod/try=> (scan "\\/" gon)
700+ > (scan "\\/" gon)
438701 [~~~5c. ~ ~~~2f.]
439− ~zod/try=> (gon [[1 1] "\\/"])
702+ > (gon [[1 1] "\\/"])
440703 [p=[p=1 q=3] q=[~ u=[p=[~~~5c. ~ ~~~2f.] q=[p=[p=1 q=3] q=""]]]]
441704
442705
@@ -456,9 +719,9 @@ Source
456719Examples
457720--------
458721
459− ~zod/try=> (scan "<" gul)
722+ > (scan "<" gul)
460723 2
461− ~zod/try=> (scan ">" gul)
724+ > (scan ">" gul)
462725 3
463726
464727
@@ -478,19 +741,19 @@ Source
478741Examples
479742--------
480743
481− ~zod/try=> (scan "a" hex)
744+ > (scan "a" hex)
482745 10
483− ~zod/try=> (scan "A" hex)
746+ > (scan "A" hex)
484747 10
485− ~zod/try=> (scan "2A" hex)
748+ > (scan "2A" hex)
486749 42
487− ~zod/try=> (scan "1ee7" hex)
750+ > (scan "1ee7" hex)
488751 7.911
489− ~zod/try=> (scan "1EE7" hex)
752+ > (scan "1EE7" hex)
490753 7.911
491− ~zod/try=> (scan "1EE7F7" hex)
754+ > (scan "1EE7F7" hex)
492755 2.025.463
493− ~zod/try=> `@ux`(scan "1EE7F7" hex)
756+ > `@ux`(scan "1EE7F7" hex)
494757 0x1e.e7f7
495758
496759
@@ -509,13 +772,13 @@ Source
509772Examples
510773--------
511774
512− ~zod/try=> (scan "G" hig)
775+ > (scan "G" hig)
513776 ~~~47.
514− ~zod/try=> `cord`(scan "G" hig)
777+ > `cord`(scan "G" hig)
515778 'G'
516− ~zod/try=> (scan "ABCDEFGHIJKLMNOPQRSTUVWXYZ" (star hig))
779+ > (scan "ABCDEFGHIJKLMNOPQRSTUVWXYZ" (star hig))
517780 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
518− ~zod/try=> (hig [[1 1] "G"])
781+ > (hig [[1 1] "G"])
519782 [p=[p=1 q=2] q=[~ [p=~~~47. q=[p=[p=1 q=2] q=""]]]]
520783
521784
@@ -539,13 +802,13 @@ Source
539802Examples
540803--------
541804
542− ~zod/try=> (scan "a" hit)
805+ > (scan "a" hit)
543806 10
544− ~zod/try=> (scan "A" hit)
807+ > (scan "A" hit)
545808 10
546− ~zod/try=> (hit [[1 1] "a"])
809+ > (hit [[1 1] "a"])
547810 [p=[p=1 q=2] q=[~ [p=10 q=[p=[p=1 q=2] q=""]]]]
548− ~zod/try=> (scan "2A" (star hit))
811+ > (scan "2A" (star hit))
549812 ~[2 10]
550813
551814
@@ -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) ' ')
@@ -593,17 +856,17 @@ Source
593856Examples
594857--------
595858
596− ~zod/try=> (scan "abc" (iny (star ;~(pose prn (just `@`10)))))
859+ > (scan "abc" (iny (star ;~(pose prn (just `@`10)))))
597860 "abc"
598− ~zod/try=> (scan "abc" (star ;~(pose prn (just `@`10))))
861+ > (scan "abc" (star ;~(pose prn (just `@`10))))
599862 "abc"
600− ~zod/try=> (scan " abc\0ade" ;~(pfix ace ace (star ;~(pose prn (just `@`10)))))
863+ > (scan " abc\0ade" ;~(pfix ace ace (star ;~(pose prn (just `@`10)))))
601864 "abc
602865 de"
603− ~zod/try=> (scan " abc\0ade" ;~(pfix ace ace (iny (star ;~(pose prn (just `@`10))))))
866+ > (scan " abc\0ade" ;~(pfix ace ace (iny (star ;~(pose prn (just `@`10))))))
604867 ! {1 6}
605868 ! exit
606− ~zod/try=> (scan " abc\0a de" ;~(pfix ace ace (iny (star ;~(pose prn (just `@`10))))))
869+ > (scan " abc\0a de" ;~(pfix ace ace (iny (star ;~(pose prn (just `@`10))))))
607870 "abc
608871 de"
609872
@@ -624,13 +887,13 @@ Source
624887Examples
625888--------
626889
627− ~zod/try=> (scan "g" low)
890+ > (scan "g" low)
628891 ~~g
629− ~zod/try=> `cord`(scan "g" low)
892+ > `cord`(scan "g" low)
630893 'g'
631− ~zod/try=> (scan "abcdefghijklmnopqrstuvwxyz" (star low))
894+ > (scan "abcdefghijklmnopqrstuvwxyz" (star low))
632895 "abcdefghijklmnopqrstuvwxyz"
633− ~zod/try=> (low [[1 1] "g"])
896+ > (low [[1 1] "g"])
634897 [p=[p=1 q=2] q=[~ [p=~~g q=[p=[p=1 q=2] q=""]]]]
635898
636899
@@ -646,17 +909,17 @@ 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
653916--------
654917
655− ~zod/try=> (scan "2A" mes)
918+ > (scan "2A" mes)
656919 42
657− ~zod/try=> (mes [[1 1] "2A"])
920+ > (mes [[1 1] "2A"])
658921 [p=[p=1 q=3] q=[~ u=[p=42 q=[p=[p=1 q=3] q=""]]]]
659− ~zod/try=> (scan "42" mes)
922+ > (scan "42" mes)
660923 66
661924
662925
@@ -676,9 +939,9 @@ Source
676939Examples
677940--------
678941
679− ~zod/try=> (scan "as_me" nix)
942+ > (scan "as_me" nix)
680943 q=435.626.668.897
681− ~zod/try=> `@t`(scan "as_me" nix)
944+ > `@t`(scan "as_me" nix)
682945 'as_me'
683946
684947
@@ -699,13 +962,13 @@ Source
699962Examples
700963--------
701964
702− ~zod/try=> (scan "0" nud)
965+ > (scan "0" nud)
703966 ~~0
704− ~zod/try=> (scan "7" nud)
967+ > (scan "7" nud)
705968 ~~7
706− ~zod/try=> (nud [[1 1] "1"])
969+ > (nud [[1 1] "1"])
707970 [p=[p=1 q=2] q=[~ [p=~~1 q=[p=[p=1 q=2] q=""]]]]
708− ~zod/try=> (scan "0123456789" (star nud))
971+ > (scan "0123456789" (star nud))
709972 "0123456789"
710973
711974
@@ -724,11 +987,11 @@ Source
724987Examples
725988--------
726989
727− ~zod/try=> (scan "h" prn)
990+ > (scan "h" prn)
728991 ~~h
729− ~zod/try=> (scan "!" prn)
992+ > (scan "!" prn)
730993 ~~~21.
731− ~zod/try=> (scan "\01" prn)
994+ > (scan "\01" prn)
732995 ! {1 1}
733996 ! exit
734997
@@ -752,21 +1015,21 @@ Source
7521015Examples
7531016--------
7541017
755− ~zod/try=> (scan "%" qit)
1018+ > (scan "%" qit)
7561019 37
757− ~zod/try=> `@t`(scan "%" qit)
1020+ > `@t`(scan "%" qit)
7581021 '%'
759− ~zod/try=> (scan "0" qit)
1022+ > (scan "0" qit)
7601023 48
761− ~zod/try=> (scan "E" qit)
1024+ > (scan "E" qit)
7621025 69
763− ~zod/try=> (scan "a" qit)
1026+ > (scan "a" qit)
7641027 97
765− ~zod/try=> (scan "\\0a" qit)
1028+ > (scan "\\0a" qit)
7661029 10
767− ~zod/try=> `@ux`(scan "\\0a" qit)
1030+ > `@ux`(scan "\\0a" qit)
7681031 0xa
769− ~zod/try=> (scan "cord" (star qit))
1032+ > (scan "cord" (star qit))
7701033 ~[99 111 114 100]
7711034
7721035
@@ -789,21 +1052,21 @@ Source
7891052Examples
7901053--------
7911054
792− ~zod/try=> (scan "%" qit)
1055+ > (scan "%" qit)
7931056 37
794− ~zod/try=> `@t`(scan "%" qit)
1057+ > `@t`(scan "%" qit)
7951058 '%'
796− ~zod/try=> (scan "0" qit)
1059+ > (scan "0" qit)
7971060 48
798− ~zod/try=> (scan "E" qit)
1061+ > (scan "E" qit)
7991062 69
800− ~zod/try=> (scan "a" qit)
1063+ > (scan "a" qit)
8011064 97
802− ~zod/try=> (scan "\\0a" qit)
1065+ > (scan "\\0a" qit)
8031066 10
804− ~zod/try=> `@ux`(scan "\\0a" qit)
1067+ > `@ux`(scan "\\0a" qit)
8051068 0xa
806− ~zod/try=> (scan "cord" (star qit))
1069+ > (scan "cord" (star qit))
8071070 ~[99 111 114 100]
8081071
8091072
@@ -836,13 +1099,13 @@ Source
8361099Examples
8371100--------
8381101
839− ~zod/try=> (scan "'cord'" qut)
1102+ > (scan "'cord'" qut)
8401103 q=1.685.221.219
841− ~zod/try=> 'cord'
1104+ > 'cord'
8421105 'cord'
843− ~zod/try=> `@ud`'cord'
1106+ > `@ud`'cord'
8441107 1.685.221.219
845− /~zod/try=> '''
1108+ /> '''
8461109 Heredoc isn't prohibited from containing quotes
8471110 '''
8481111 'Heredoc isn't prohibited from containing quotes'
@@ -864,9 +1127,9 @@ Source
8641127Examples
8651128--------
8661129
867− ~zod/try=> (scan "'''" soz)
1130+ > (scan "'''" soz)
8681131 [~~~27. ~~~27. ~~~27.]
869− ~zod/try=> (rash '"""' soz)
1132+ > (rash '"""' soz)
8701133 ! {1 1}
8711134 ! exit
8721135
@@ -891,11 +1154,11 @@ Source
8911154Examples
8921155--------
8931156
894− ~zod/try=> (scan "sam-2" sym)
1157+ > (scan "sam-2" sym)
8951158 215.510.507.891
896− ~zod/try=> `@t`(scan "sam-2" sym)
1159+ > `@t`(scan "sam-2" sym)
8971160 'sam-2'
898− ~zod/try=> (scan "sym" sym)
1161+ > (scan "sym" sym)
8991162 7.174.515
9001163
9011164
@@ -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)
@@ -989,349 +1252,12 @@ with a newline character.
9891252Examples
9901253--------
9911254
992− ~zod/try=> (scan "::this is a comment \0a" vul)
1255+ > (scan "::this is a comment \0a" vul)
9931256 ~
994− ~zod/try=> (scan "::this is a comment " vul)
1257+ > (scan "::this is a comment " vul)
9951258 ! {1 21}
9961259 ! exit
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+235−116
@@ -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-------
@@ -20,7 +20,7 @@ Source
2020Examples
2121--------
2222
23− ~zod/try=> so
23+ > so
2424 <10.mkn 414.hhh 100.xkc 1.ypj %164>
2525
2626------------------------------------------------------------------------
@@ -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-------
@@ -58,9 +58,9 @@ Source
5858Examples
5959--------
6060
61− ~zod/try=> (scan "25" bisk:so)
61+ > (scan "25" bisk:so)
6262 [%ud q=25]
63− ~zod/try=> (scan "0x12.6401" bisk:so)
63+ > (scan "0x12.6401" bisk:so)
6464 [%ux q=1.205.249]
6565
6666------------------------------------------------------------------------
@@ -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,24 +133,126 @@ 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
142− ~zod/try=> (scan "1926.5.12" crub:so)
245+ > (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+ > ([%da @da] (scan "1926.5.12" crub:so))
145248 [%da ~1926.5.12]
146− ~zod/try=> (scan "s10" crub:so)
249+ > (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+ > ([%dr @dr] (scan "s10" crub:so))
149252 [%dr ~s10]
150− ~zod/try=> (scan "doznec" crub:so)
253+ > (scan "doznec" crub:so)
151254 [%p 256]
152− ~zod/try=> (scan ".mas" crub:so)
255+ > (scan ".mas" crub:so)
153256 [%ta 7.561.581]
154257
155258------------------------------------------------------------------------
@@ -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,40 +273,43 @@ 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--------
186292
187− ~zod/try=> (scan "~pillyt" nuck:so)
293+ > (scan "~pillyt" nuck:so)
188294 [% p=[p=~.p q=32.819]]
189− ~zod/try=> (scan "0x12" nuck:so)
295+ > (scan "0x12" nuck:so)
190296 [% p=[p=~.ux q=18]]
191− ~zod/try=> (scan ".127.0.0.1" nuck:so)
297+ > (scan ".127.0.0.1" nuck:so)
192298 [% p=[p=~.if q=2.130.706.433]]
193− ~zod/try=> `@ud`.127.0.0.1
299+ > `@ud`.127.0.0.1
194300 2.130.706.433
195− ~zod/try=> (scan "._20_0w25_sam__" nuck:so)
301+ > (scan "._20_0w25_sam__" nuck:so)
196302 [ %many
197303 p
198304 ~[[% p=[p=~.ud q=20]] [% p=[p=~.uw q=133]] [% p=[p=~.tas q=7.168.371]]]
199305 ]
200− ~zod/try=> `@`%sam
306+ > `@`%sam
201307 7.168.371
202− ~zod/try=> (scan "~0ph" nuck:so)
308+ > (scan "~0ph" nuck:so)
203309 [%blob p=[1 1]]
204− ~zod/try=> ~0ph
310+ > ~0ph
205311 [1 1]
206− ~zod/try=> `@uv`(jam [1 1])
312+ > `@uv`(jam [1 1])
207313 0vph
208314
209315------------------------------------------------------------------------
@@ -225,18 +331,18 @@ 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--------
232338
233− ~zod/try=> ~.asd_a
339+ > ~.asd_a
234340 ~.asd_a
235− ~zod/try=> ._1_~~.asd~-a__
341+ > ._1_~~.asd~-a__
236342 [1 ~.asd_a]
237− ~zod/try=> (scan "~~.asd~-a" nusk:so)
343+ > (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+ > ([~ %ta @ta] (scan "~~.asd~-a" nusk:so))
240346 [~ %ta ~.asd_a]
241347
242348------------------------------------------------------------------------
@@ -266,13 +372,13 @@ Source
266372Examples
267373--------
268374
269− ~zod/try=> (scan "y" perd:so)
375+ > (scan "y" perd:so)
270376 [~ [%f %.y]]
271− ~zod/try=> (scan "n" perd:so)
377+ > (scan "n" perd:so)
272378 [~ [%f %.n]]
273− ~zod/try=> |
379+ > |
274380 %.n
275− ~zod/try=> (scan "_20_x__" perd:so)
381+ > (scan "_20_x__" perd:so)
276382 [%many [[% p=[p=~.ud q=20]] ~[[% p=[p=~.tas q=120]]]]]
277383
278384------------------------------------------------------------------------
@@ -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,35 +398,58 @@ 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--------
320449
321− ~zod/try=> (scan "~3.14" royl:so)
450+ > (scan "~3.14" royl:so)
322451 [%rd .~3.13999999999999]
323− ~zod/try=> .~3.14
452+ > .~3.14
324453 .~3.13999999999999
325454
326455------------------------------------------------------------------------
@@ -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,57 +478,38 @@ 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--------
386505
387− ~zod/try=> (scan "-20" tash:so)
506+ > (scan "-20" tash:so)
388507 [p=~.sd q=39]
389− ~zod/try=> (,[%sd @sd] (scan "-20" tash:so))
508+ > (,[%sd @sd] (scan "-20" tash:so))
390509 [%sd -20]
391− ~zod/try=> (,[%sd @sd] (scan "--20" tash:so))
510+ > (,[%sd @sd] (scan "--20" tash:so))
392511 [%sd --20]
393− ~zod/try=> (,[%sx @sx] (scan "--0x2e" tash:so))
512+ > (,[%sx @sx] (scan "--0x2e" tash:so))
394513 [%sx --0x2e]
395514
396515------------------------------------------------------------------------
@@ -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 ::
@@ -420,15 +539,15 @@ Source
420539Examples
421540--------
422541
423− ~zod/try=> (scan "zod" twid:so)
542+ > (scan "zod" twid:so)
424543 [~ [%p 0]]
425− ~zod/try=> (scan ".sam" twid:so)
544+ > (scan ".sam" twid:so)
426545 [~ [%ta 7.168.371]]
427− ~zod/try=> `@ud`~.sam
546+ > `@ud`~.sam
428547 7.168.371
429− ~zod/try=> `@t`~.sam
548+ > `@t`~.sam
430549 'sam'
431− ~zod/try=> (scan "0ph" twid:so)
550+ > (scan "0ph" twid:so)
432551 [%blob [1 1]]
433552
434553------------------------------------------------------------------------
@@ -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-------
@@ -461,17 +580,17 @@ Source
461580Examples
462581--------
463582
464− ~zod/try=> (scan "127.0.0.1" zust:so)
583+ > (scan "127.0.0.1" zust:so)
465584 [%if q=2.130.706.433]
466− ~zod/try=> (scan "af.0.0.0.0.e7a5.30d2.7" zust:so)
585+ > (scan "af.0.0.0.0.e7a5.30d2.7" zust:so)
467586 [%is q=908.651.950.243.594.834.993.091.554.288.205.831]
468− ~zod/try=> (,[%is @is] (scan "af.0.0.0.0.e7a5.30d2.7" zust:so))
587+ > (,[%is @is] (scan "af.0.0.0.0.e7a5.30d2.7" zust:so))
469588 [%is .af.0.0.0.0.e7a5.30d2.7]
470− ~zod/try=> (,[%is @ux] (scan "af.0.0.0.0.e7a5.30d2.7" zust:so))
589+ > (,[%is @ux] (scan "af.0.0.0.0.e7a5.30d2.7" zust:so))
471590 [%is 0xaf.0000.0000.0000.0000.e7a5.30d2.0007]
472− ~zod/try=> (scan "y" zust:so)
591+ > (scan "y" zust:so)
473592 [%f %.y]
474− ~zod/try=> (scan "12.09" zust:so)
593+ > (scan "12.09" zust:so)
475594 [%rd .~12.00999999999999]
476595
477596
docs/system/hoon/library/4m.md+104−98
@@ -11,31 +11,31 @@ 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--------
2323
24− ~zod/try=> (scot %p ~pillyt)
24+ > (scot %p ~pillyt)
2525 ~.~pillyt
26− ~zod/try=> `@t`(scot %p ~pillyt)
26+ > `@t`(scot %p ~pillyt)
2727 '~pillyt'
28− ~zod/try=> (scot %ux 0x12)
28+ > (scot %ux 0x12)
2929 ~.0x12
30− ~zod/try=> `@t`(scot %ux 0x12)
30+ > `@t`(scot %ux 0x12)
3131 '0x12'
32− ~zod/try=> (scot %if .127.0.0.1)
32+ > (scot %if .127.0.0.1)
3333 ~..127.0.0.1
34− ~zod/try=> `@t`(scot %if .127.0.0.1)
34+ > `@t`(scot %if .127.0.0.1)
3535 '.127.0.0.1'
36− ~zod/try=> (scot %ta ~.asd_a)
36+ > (scot %ta ~.asd_a)
3737 ~.~.asd_a
38− ~zod/try=> `@t`(scot %ta ~.asd_a)
38+ > `@t`(scot %ta ~.asd_a)
3939 '~.asd_a'
4040
4141
@@ -53,23 +53,23 @@ 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--------
6565
66− ~zod/try=> (scow %p ~pillyt)
66+ > (scow %p ~pillyt)
6767 "~pillyt"
68− ~zod/try=> (scow %ux 0x12)
68+ > (scow %ux 0x12)
6969 "0x12"
70− ~zod/try=> (scow %if .127.0.0.1)
70+ > (scow %if .127.0.0.1)
7171 ".127.0.0.1"
72− ~zod/try=> (scow %ta ~.asd_a)
72+ > (scow %ta ~.asd_a)
7373 "~.asd_a"
7474
7575
@@ -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+ > `(unit @p)`((slat %p) '~pillyt')
104104 [~ ~pillyt]
105− ~zod/try=> `(unit ,@ux)`((slat %ux) '0x12')
105+ > `(unit @ux)`((slat %ux) '0x12')
106106 [~ 0x12]
107− ~zod/try=> `(unit ,@if)`((slat %if) '.127.0.0.1')
107+ > `(unit @if)`((slat %if) '.127.0.0.1')
108108 [~ .127.0.0.1]
109− ~zod/try=> `(unit ,@ta)`((slat %ta) '~.asd_a')
109+ > `(unit @ta)`((slat %ta) '~.asd_a')
110110 [~ ~.asd_a
111111
112112
@@ -125,33 +125,33 @@ 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--------
139139
140− ~zod/try=> `@p`(slav %p '~pillyt')
140+ > `@p`(slav %p '~pillyt')
141141 ~pillyt
142− ~zod/try=> `@p`(slav %p '~pillam')
142+ > `@p`(slav %p '~pillam')
143143 ! exit
144− ~zod/try=> `@ux`(slav %ux '0x12')
144+ > `@ux`(slav %ux '0x12')
145145 0x12
146− ~zod/try=> `@ux`(slav %ux '0b10')
146+ > `@ux`(slav %ux '0b10')
147147 ! exit
148− ~zod/try=> `@if`(slav %if '.127.0.0.1')
148+ > `@if`(slav %if '.127.0.0.1')
149149 .127.0.0.1
150− ~zod/try=> `@if`(slav %if '.fe80.0.0.202')
150+ > `@if`(slav %if '.fe80.0.0.202')
151151 ! exit
152− ~zod/try=> `@ta`(slav %ta '~.asd_a')
152+ > `@ta`(slav %ta '~.asd_a')
153153 ~.asd_a
154− ~zod/try=> `@ta`(slav %ta '~~asd-a')
154+ > `@ta`(slav %ta '~~asd-a')
155155 ! exit
156156
157157
@@ -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+ > `(unit @p)`(slaw %p '~pillyt')
190191 [~ ~pillyt]
191− ~zod/try=> `(unit ,@p)`(slaw %p '~pillam')
192+ > `(unit @p)`(slaw %p '~pillam')
192193 ~
193− ~zod/try=> `(unit ,@ux)`(slaw %ux '0x12')
194+ > `(unit @ux)`(slaw %ux '0x12')
194195 [~ 0x12]
195− ~zod/try=> `(unit ,@ux)`(slaw %ux '0b10')
196+ > `(unit @ux)`(slaw %ux '0b10')
196197 ~
197− ~zod/try=> `(unit ,@if)`(slaw %if '.127.0.0.1')
198+ > `(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+ > `(unit @if)`(slaw %if '.fe80.0.0.202')
200201 ~
201− ~zod/try=> `(unit ,@ta)`(slaw %ta '~.asd_a')
202+ > `(unit @ta)`(slaw %ta '~.asd_a')
202203 [~ ~.asd_a]
203− ~zod/try=> `(unit ,@ta)`(slaw %ta '~~asd-a')
204+ > `(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,45 +219,49 @@ 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--------
236241
237− ~zod/try=> (slay '~pillyt')
242+ > (slay '~pillyt')
238243 [~ [% p=[p=~.p q=32.819]]]
239− ~zod/try=> (slay '0x12')
244+ > (slay '0x12')
240245 [~ [% p=[p=~.ux q=18]]]
241− ~zod/try=> (slay '.127.0.0.1')
246+ > (slay '.127.0.0.1')
242247 [~ [% p=[p=~.if q=2.130.706.433]]]
243− ~zod/try=> `@ud`.127.0.0.1
248+ > `@ud`.127.0.0.1
244249 2.130.706.433
245− ~zod/try=> (slay '._20_0w25_sam__')
250+ > (slay '._20_0w25_sam__')
246251 [ ~
247252 [ %many
248253 p=~[[% p=[p=~.ud q=20]] [% p=[p=~.uw q=133]] [% p=[p=~.tas q=7.168.371]]]
249254 ]
250255 ]
251− ~zod/try=> `@`%sam
256+ > `@`%sam
252257 7.168.371
253− ~zod/try=> (slay '~0ph')
258+ > (slay '~0ph')
254259 [~ [%blob p=[1 1]]]
255− ~zod/try=> 0ph
260+ > 0ph
256261 ~ <syntax error at [1 2]>
257− ~zod/try=> ~0ph
262+ > ~0ph
258263 [1 1]
259− ~zod/try=> `@uv`(jam [1 1])
264+ > `@uv`(jam [1 1])
260265 0vph
261266
262267
@@ -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,21 +280,21 @@ 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--------
291296
292− ~zod/try=> (smyt %)
297+ > (smyt %)
293298 [ %rose
294299 p=[p="/" q="/" r="/"]
295300 q
@@ -298,7 +303,7 @@ Examples
298303 [%leaf p="~2014.10.28..18.36.58..a280"]
299304 ]
300305 ]
301− ~zod/try=> (smyt /as/les/top)
306+ > (smyt /as/les/top)
302307 [ %rose
303308 p=[p="/" q="/" r="/"]
304309 q=~[[%leaf p="as"] [%leaf p="les"] [%leaf p="top"]]
@@ -319,21 +324,21 @@ 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--------
331336
332− ~zod/try=> (spat %)
337+ > (spat %)
333338 '~zod/try/~2014.10.28..18.40.20..4287'
334− ~zod/try=> (spat %/bin)
339+ > (spat %/bin)
335340 '~zod/try/~2014.10.28..18.41.12..3bcd/bin'
336− ~zod/try=> (spat /as/les/top)
341+ > (spat /as/les/top)
337342 '/as/les/top'
338343
339344
@@ -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,21 +356,21 @@ 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--------
363368
364− ~zod/try=> (spud %)
369+ > (spud %)
365370 "~zod/try/~2014.10.28..18.40.46..e951"
366− ~zod/try=> (spud %/bin)
371+ > (spud %/bin)
367372 "~zod/try/~2014.10.28..18.41.05..16f2/bin"
368− ~zod/try=> (spud /as/les/top)
373+ > (spud /as/les/top)
369374 "/as/les/top"
370375
371376
@@ -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,24 +391,25 @@ 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--------
395401
396− ~zod/try=> (stab '/as/lek/tor')
402+ > (stab '/as/lek/tor')
397403 /as/lek/tor
398− ~zod/try=> `(pole ,@ta)`(stab '/as/lek/tor')
404+ > `(pole ,@ta)`(stab '/as/lek/tor')
399405 [~.as [~.lek [~.tor ~]]]
400− ~zod/try=> (stab '~zod/arvo/~2014.10.28..18.48.41..335f/zuse')
406+ > (stab '~zod/arvo/~2014.10.28..18.48.41..335f/zuse')
401407 ~zod/arvo/~2014.10.28..18.48.41..335f/zuse
402− ~zod/try=> `(pole ,@ta)`(stab '~zod/arvo/~2014.10.28..18.48.41..335f/zuse')
408+ > `(pole ,@ta)`(stab '~zod/arvo/~2014.10.28..18.48.41..335f/zuse')
403409 [~.~zod [~.arvo [~.~2014.10.28..18.48.41..335f [~.zuse ~]]]]
404− ~zod/try=> (stab '/a/~pillyt/pals/1')
410+ > (stab '/a/~pillyt/pals/1')
405411 /a/~pillyt/pals/1
406− ~zod/try=> `(pole ,@ta)`(stab '/a/~pillyt/pals/1')
412+ > `(pole ,@ta)`(stab '/a/~pillyt/pals/1')
407413 [~.a [~.~pillyt [~.pals [~.1 ~]]]]
408414
409415
docs/system/hoon/library/4n.md+133−150
@@ -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,24 +23,25 @@ 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
35− ~zod/try=> (mack [[1 2 3] [0 1]])
36+ > (mack [[1 2 3] [0 1]])
3637 [~ [1 2 3]]
37− ~zod/try=> (mack [41 4 0 1])
38+ > (mack [41 4 0 1])
3839 [~ 42]
39− ~zod/try=> (mack [4 0 4])
40+ > (mack [4 0 4])
4041 ~
41− ~zod/try=> (mack [[[0 2] [1 3]] 4 4 4 4 0 5])
42+ > (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+ > ;;((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+ > (mink [20 [4 0 1]] $~)
155158 [%0 p=21]
156− ~zod/try=> (mink [[90 5 3] [0 3]] ,~)
159+ > (mink [[90 5 3] [0 3]] $~)
157160 [%0 p=[5 3]]
158− ~zod/try=> (mink 20^[4 0 1] ,~)
161+ > (mink 20^[4 0 1] $~)
159162 [%0 p=21]
160− ~zod/try=> (mink [90 5 3]^[0 3] ,~)
163+ > (mink [90 5 3]^[0 3] $~)
161164 [%0 p=[5 3]]
162− ~zod/try=> (mink [0]^[11 1 20] ,~)
165+ > (mink [0]^[11 1 20] $~)
163166 [%1 p=~[20]]
164− ~zod/try=> (mink [0]^[11 1 20] |=(a=* `[40 a]))
167+ > (mink [0]^[11 1 20] |=(a=* `[40 a]))
165168 [%0 p=[40 20]]
166− ~zod/try=> (mink [5]^[0 2] ,~)
169+ > (mink [5]^[0 2] $~)
167170 [%2 p=~]
168− ~zod/try=> (mink [5]^[10 yelp/[0 1] 0 0] ,~)
171+ > (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,26 +200,27 @@ 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
207− ~zod/try=> (mock [5 4 0 1] ,~)
211+ > (mock [5 4 0 1] ,~)
208212 [%0 p=6]
209− ~zod/try=> (mock [~ 11 1 0] |=(* `999))
213+ > (mock [~ 11 1 0] |=(* `999))
210214 [%0 p=999]
211− ~zod/try=> (mock [~ 0 1.337] ,~)
215+ > (mock [~ 0 1.337] ,~)
212216 [%2 p=~]
213− ~zod/try=> (mock [~ 11 1 1.337] ,~)
217+ > (mock [~ 11 1 1.337] ,~)
214218 [%1 p=~[1.337]]
215− ~zod/try=> (mock [[[4 4 4 4 0 3] 10] 11 9 2 0 1] |=(* `[+<]))
219+ > (mock [[[4 4 4 4 0 3] 10] 11 9 2 0 1] |=(* `[+<]))
216220 [%0 p=14]
217− ~zod/try=> (mock [[[4 4 4 4 0 3] 10] 11 9 2 0 1] |=(* `[<+<>]))
221+ > (mock [[[4 4 4 4 0 3] 10] 11 9 2 0 1] |=(* `[<+<>]))
218222 [%0 p=[49 52 0]]
219− ~zod/try=> ;;(tape +:(mock [[[4 4 4 4 0 3] 10] 11 9 2 0 1] |=(* `[<+<>])))
223+ > ;;(tape +:(mock [[[4 4 4 4 0 3] 10] 11 9 2 0 1] |=(* `[<+<>])))
220224 "14"
221225
222226
@@ -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,33 +251,33 @@ 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
258262--------
259263
260− ~zod/try=> (mong [|=(@ 20) ~] ,~)
264+ > (mong [|=(@ 20) ~] ,~)
261265 [%0 p=20]
262− ~zod/try=> (mong [|=(@ !!) ~] ,~)
266+ > (mong [|=(@ !!) ~] ,~)
263267 [%2 p=~]
264− ~zod/try=> (mong [|=(a=@ (add 20 a)) ~] ,~)
268+ > (mong [|=(a/@ (add 20 a)) ~] ,~)
265269 [%0 p=20]
266− ~zod/try=> (mong [|=(a=[@ @] (add 20 -.a)) ~] ,~)
270+ > (mong [|=(a/[@ @] (add 20 -.a)) ~] ,~)
267271 [%2 p=~]
268− ~zod/try=> (mong [|=(a=[@ @] (add 20 -.a)) [4 6]] ,~)
272+ > (mong [|=(a/[@ @] (add 20 -.a)) [4 6]] ,~)
269273 [%0 p=24]
270− ~zod/try=> (mong [|=(a=@ .^(a)) ~] ,~)
274+ > (mong [|=(a/@ .^(a)) ~] ,~)
271275 [%1 p=~[0]]
272− ~zod/try=> (mong [|=(a=@ .^(a)) ~] ,[~ %42])
276+ > (mong [|=(a/@ .^(a)) ~] ,[~ %42])
273277 [%0 p=42]
274− ~zod/try=> (mong [|=(a=@ .^(a)) ~] |=(a=* [~ a 6]))
278+ > (mong [|=(a/@ .^(a)) ~] |=(a/* [~ a 6]))
275279 [%0 p=[0 6]]
276− ~zod/try=> (mong [|=(a=@ .^(a)) 8] |=(a=* [~ a 6]))
280+ > (mong [|=(a/@ .^(a)) 8] |=(a/* [~ a 6]))
277281 [%0 p=[8 6]]
278282
279283
@@ -283,81 +287,70 @@ 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
350343--------
351344
352− ~zod/try=> (mook [%0 5 4 5 1])
345+ > (mook [%0 5 4 5 1])
353346 [%0 p=[5 4 5 1]]
354− ~zod/try=> (mook [%2 ~[[%hunk %rose ["<" "," ">"] ~[[%leaf "err"]]]]])
347+ > (mook [%2 ~[[%hunk %rose ["<" "," ">"] ~[[%leaf "err"]]]]])
355348 [%2 p=~[[%rose p=[p="<" q="," r=">"] q=[i=[%leaf p="err"] t=~]]]]
356− ~zod/try=> (mook [%2 ~[[%malformed %elem] [%lose 'do print']]])
349+ > (mook [%2 ~[[%malformed %elem] [%lose 'do print']]])
357350 [%2 p=~[[%leaf p="do print"]]]
358− ~zod/try=> (mook [%2 ~[[%mean |.(>(add 5 6)<)]]])
351+ > (mook [%2 ~[[%mean |.(>(add 5 6)<)]]])
359352 [%2 p=~[[%leaf p="11"]]]
360− ~zod/try=> (mook [%2 ~[[%spot /b/repl [1 1]^[1 2]] [%mean |.(!!)]]])
353+ > (mook [%2 ~[[%spot /b/repl [1 1]^[1 2]] [%mean |.(!!)]]])
361354 [%2 p=~[[%leaf p="/b/repl/:<[1 1].[1 2]>"] [%leaf p="####"]]]
362355
363356
@@ -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,22 +378,23 @@ 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
399− ~zod/try=> (mule |.(leaf/"hello"))
393+ > (mule |.(leaf/"hello"))
400394 [%.y p=[%leaf "hello"]]
401− ~zod/try=> (mule |.(!!))
395+ > (mule |.(!!))
402396 [%.n p=~]
403− ~zod/try=> (mule |.(.^(a//=pals/1)))
397+ > (mule |.(.^(a//=pals/1)))
404398 [ %.n
405399 p
406400 ~[
@@ -422,50 +416,39 @@ 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
454− ~zod/try=> (mute |.(leaf/"hello"))
448+ > (mute |.(leaf/"hello"))
455449 [%.y p=[1.717.658.988 104 101 108 108 111 0]]
456− ~zod/try=> (mute |.(!!))
450+ > (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/4o.md+60−60
@@ -11,7 +11,7 @@ Source
1111Examples
1212--------
1313
14− ~zod/try=> *abel
14+ > *abel
1515 %void
1616
1717
@@ -35,7 +35,7 @@ Examples
3535
3636See also: [`++base`](), [aura reference]()
3737
38− ~zod/try=> `aura`%ux
38+ > `aura`%ux
3939 ~.ux
4040
4141
@@ -57,13 +57,13 @@ Source
5757Examples
5858--------
5959
60− ~zod/try=> *axis
60+ > *axis
6161 0
6262
63− ~zod/try=> :: 0 is not actually a valid axis
64− ~zod/try=> [[4 5] 6 7]
63+ > :: 0 is not actually a valid axis
64+ > [[4 5] 6 7]
6565 [[4 5] 6 7]
66− ~zod/try=> `axis`0b110
66+ > `axis`0b110
6767 6
6868
6969
@@ -84,15 +84,15 @@ Source
8484Examples
8585--------
8686
87− ~zod/try=> *base
87+ > *base
8888 %null
8989
90− ~zod/try=> (ream '=|(^ !!)')
90+ > (ream '=|(^ !!)')
9191 [%tsbr p=[%axil p=%cell] q=[%zpzp ~]]
92− ~zod/try=> :: p.p is a ++base
93− ~zod/try=> (ream '=|(@t !!)')
92+ > :: p.p is a ++base
93+ > (ream '=|(@t !!)')
9494 [%tsbr p=[%axil p=[%atom p=~.t]] q=[%zpzp ~]]
95− ~zod/try=> (ream '=|(? !!)')
95+ > (ream '=|(? !!)')
9696 [%tsbr p=[%axil p=%bean] q=[%zpzp ~]]
9797
9898
@@ -111,12 +111,12 @@ Source
111111Examples
112112--------
113113
114− ~zod/try=> *bean
114+ > *bean
115115 %.y
116116
117− ~zod/try=> `bean`&
117+ > `bean`&
118118 %.y
119− ~zod/try=> `bean`|
119+ > `bean`|
120120 %.n
121121
122122
@@ -136,9 +136,9 @@ Source
136136Examples
137137--------
138138
139− ~zod/try=> `beer`'as'
139+ > `beer`'as'
140140 29.537
141− ~zod/try=> `beer`[~ (ream 'lan')]
141+ > `beer`[~ (ream 'lan')]
142142 [~ p=[%cnzz p=~[%lan]]]
143143
144144
@@ -185,10 +185,10 @@ Examples
185185
186186XX there's a ++chum in zuse that's politely causing this not to work
187187
188− ~zod/try=> `chum`'hi'
188+ > `chum`'hi'
189189 lef=%hi
190190
191− ~zod/try=> (ream '~/(%lob.314 !!)')
191+ > (ream '~/(%lob.314 !!)')
192192 [%sgfs p=[std=%lob kel=314] q=[%zpzp ~]]
193193
194194
@@ -232,16 +232,16 @@ Examples
232232
233233See also: [`++ap`](), [`++ut`]()
234234
235− ~zod/try=> *foot
235+ > *foot
236236 [%yew p={}]
237237
238− ~zod/try=> (ream '|% ++ $ foo --')
238+ > (ream '|% ++ $ foo --')
239239 [%brcn p={[p=%$ q=[%ash p=[%cnzz p=~[%foo]]]]}]
240− ~zod/try=> +<+:(ream '|% ++ $ foo --')
240+ > +<+:(ream '|% ++ $ foo --')
241241 t=~[%ash %cnzz %foo]
242− ~zod/try=> (foot +<+:(ream '|% ++ $ foo --'))
242+ > (foot +<+:(ream '|% ++ $ foo --'))
243243 [%ash p=[%cnzz p=~[%foo]]]
244− ~zod/try=> (foot +<+:(ream '|% +- $ foo --'))
244+ > (foot +<+:(ream '|% +- $ foo --'))
245245 [%elm p=[%cnzz p=~[%foo]]]
246246
247247***
@@ -255,11 +255,11 @@ Reference into subject by name/axis
255255
256256See also: section 2fC-2fD
257257
258− ~zod/try=> (ream '^^$')
258+ > (ream '^^$')
259259 [%cnzz p=~[[%.n p=2 q=%$]]]
260− ~zod/try=> (limb &2:(ream '^^$'))
260+ > (limb &2:(ream '^^$'))
261261 [%.n p=2 q=%$]
262− ~zod/try=> (limb &2:(ream '^^^$'))
262+ > (limb &2:(ream '^^^$'))
263263 [%.n p=3 q=%$]
264264
265265
@@ -278,7 +278,7 @@ Source
278278Examples
279279--------
280280
281− ~zod/try=> (ream '$%([1 a] [%2 b])')
281+ > (ream '$%([1 a] [%2 b])')
282282 [ %bccm
283283 p
284284 [ %kelp
@@ -288,9 +288,9 @@ Examples
288288 ]
289289 ]
290290 ]
291− ~zod/try=> &3:(ream '$%([1 a] [%2 b])')
291+ > &3:(ream '$%([1 a] [%2 b])')
292292 p=[p=[%leaf p=%ud q=1] q=[%herb p=[%cnzz p=~[%a]]]]
293− ~zod/try=> (line &3:(ream '$%([1 a] [%2 b])'))
293+ > (line &3:(ream '$%([1 a] [%2 b])'))
294294 [p=[%leaf p=~.ud q=1] q=[%herb p=[%cnzz p=~[%a]]]]
295295
296296
@@ -329,9 +329,9 @@ Source
329329Examples
330330--------
331331
332− ~zod/try=> !=([+(.) 20 -<])
332+ > !=([+(.) 20 -<])
333333 [[4 0 1] [1 20] 0 4]
334− ~zod/try=> (nock !=([+(.) 20]))
334+ > (nock !=([+(.) 20]))
335335 [p=[%4 p=[%0 p=1]] q=[%1 p=20]]
336336
337337
@@ -343,7 +343,7 @@ Examples
343343
344344Used nowhere XX
345345
346− ~zod/try=> `noun`~[1 2 3]
346+ > `noun`~[1 2 3]
347347 [1 2 3 0]
348348
349349
@@ -355,7 +355,7 @@ Used nowhere XX
355355
356356Used nowhere XX
357357
358− ~zod/try=> :type; *null
358+ > :type; *null
359359 ~
360360 %~
361361
@@ -381,7 +381,7 @@ Source
381381Examples
382382--------
383383
384− ~zod/try=> *port
384+ > *port
385385 [p=0 q=[%.y p=%void]]
386386
387387
@@ -402,18 +402,18 @@ Source
402402 ++ span ,@ta :: text-atom (ASCII)
403403Examples
404404--------
405− ~zod/try=> *span
405+ > *span
406406 ~.
407407
408− ~zod/try=> `@t`~.foo
408+ > `@t`~.foo
409409 'foo'
410− ~zod/try=> `@t`~.foo.bar
410+ > `@t`~.foo.bar
411411 'foo.bar'
412− ~zod/try=> `@t`~.foo~~bar
412+ > `@t`~.foo~~bar
413413 'foo~bar'
414− ~zod/try=> `@t`~.foo~-bar
414+ > `@t`~.foo~-bar
415415 'foo_bar'
416− ~zod/try=> `@t`~.foo-bar
416+ > `@t`~.foo-bar
417417 'foo-bar'
418418
419419
@@ -433,7 +433,7 @@ Examples
433433
434434A `++wing` or `++twig`.
435435
436− ~zod/try=> (ream '=+ a=4 ?-(a @ ~)')
436+ > (ream '=+ a=4 ?-(a @ ~)')
437437 [ %tsls
438438 p=[%ktts p=p=%a q=[%dtzy p=%ud q=4]]
439439 q
@@ -442,7 +442,7 @@ A `++wing` or `++twig`.
442442 q=~[[p=[%axil p=[%atom p=~.]] q=[%bczp p=%null]]]
443443 ]
444444 ]
445− ~zod/try=> (ream '=+ a=4 ?-(4 @ ~)')
445+ > (ream '=+ a=4 ?-(4 @ ~)')
446446 [ %tsls
447447 p=[%ktts p=p=%a q=[%dtzy p=%ud q=4]]
448448 q
@@ -474,21 +474,21 @@ Source
474474Examples
475475--------
476476
477− ~zod/try=> a=1
477+ > a=1
478478 a=1
479− ~zod/try=> (ream 'a=1')
479+ > (ream 'a=1')
480480 [%ktts p=p=%a q=[%dtzy p=%ud q=1]]
481− ~zod/try=> [a b]=[1 2 3]
481+ > [a b]=[1 2 3]
482482 [a=1 b=[2 3]]
483− ~zod/try=> (ream '[a b]=[1 2 3]')
483+ > (ream '[a b]=[1 2 3]')
484484 [ %ktts
485485 p=[%2 p=p=%a q=p=%b]
486486 q=[%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
487487 ]
488488
489− ~zod/try=> [a ~]=[1 2 3]
489+ > [a ~]=[1 2 3]
490490 [a=1 2 3]
491− ~zod/try=> (ream '[a ~]=[1 2 3]')
491+ > (ream '[a ~]=[1 2 3]')
492492 [ %ktts
493493 p=[%2 p=p=%a q=[%0 ~]]
494494 q=[%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
@@ -511,17 +511,17 @@ Source
511511Examples
512512--------
513513
514− ~zod/try=> (mink [[20 21] 0 3] ,~)
514+ > (mink [[20 21] 0 3] ,~)
515515 [%0 p=21]
516516
517− ~zod/try=> (mink [[0] !=(.^(cy//=main/1))] ,~)
517+ > (mink [[0] !=(.^(cy//=main/1))] ,~)
518518 [%1 p=~[[31.075 1.685.027.454 1.852.399.981 49 0]]]
519− ~zod/try=> (path [31.075 1.685.027.454 1.852.399.981 49 0])
519+ > (path [31.075 1.685.027.454 1.852.399.981 49 0])
520520 /cy/~zod/main/1
521521
522− ~zod/try=> (mink [[1 2] !=(~|(%hi +(.)))] ,~)
522+ > (mink [[1 2] !=(~|(%hi +(.)))] ,~)
523523 [%2 p=~[[~.yelp 26.984]]]
524− ~zod/try=> (mink [[1 2] !=(!:(+(.)))] ,~)
524+ > (mink [[1 2] !=(!:(+(.)))] ,~)
525525 [ %2
526526 p
527527 ~[
@@ -586,9 +586,9 @@ Source
586586Examples
587587--------
588588
589− ~zod/try=> (ream '[1 2 3]')
589+ > (ream '[1 2 3]')
590590 [%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
591− ~zod/try=> (tusk +:(ream '[1 2 3]'))
591+ > (tusk +:(ream '[1 2 3]'))
592592 ~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]
593593
594594
@@ -622,9 +622,9 @@ Source
622622Examples
623623--------
624624
625− ~zod/try=> (scan "/==as=" porc:vast)
625+ > (scan "/==as=" porc:vast)
626626 [0 ~[~ ~ [~ [%dtzy p=%tas q=29.537]] ~]]
627− ~zod/try=> `tyke`+:(scan "/==as=" porc:vast)
627+ > `tyke`+:(scan "/==as=" porc:vast)
628628 ~[~ ~ [~ [%dtzy p=%tas q=29.537]] ~]
629629
630630
@@ -679,7 +679,7 @@ Examples
679679--------
680680See `%arvo` doc
681681
682− ~zod/try=> `vase`!>(~)
682+ > `vase`!>(~)
683683 [p=[%cube p=0 q=[%atom p=%n]] q=0]
684684
685685
@@ -713,9 +713,9 @@ term alone is the trivial case of a `++wing`.
713713
714714See also: `++twig`
715715
716− ~zod/try=> (ream 'a.+.c')
716+ > (ream 'a.+.c')
717717 [%cnzz p=~[%a [%.y p=3] %c]]
718− ~zod/try=> (wing +:(ream 'a.+.c'))
718+ > (wing +:(ream 'a.+.c'))
719719 ~[%a [%.y p=3] %c]
720720
721721
docs/system/hoon/library/5f.md+24−25
@@ -4,24 +4,24 @@
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
19− ~zod/try=> *mane
19+ > *mane
2020 %$
2121
22− ~zod/try=> `mane`n.g:`manx`;div:namespace;
22+ > `mane`n.g:`manx`;div:namespace;
2323 %div
24− ~zod/try=> `mane`n.g:`manx`;div_namespace;
24+ > `mane`n.g:`manx`;div_namespace;
2525 [%div %namespace]
2626
2727
@@ -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,17 +157,15 @@ 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 -<-
169− ~zod/try=> `time`~2014.1.1
168+ > `time`~2014.1.1
170169 ~2014.1.1
171170
172171
docs/system/hoon/runes/bc/shoe.md → docs/system/hoon/runes/bc/bccb.mdrenamed+3−3
@@ -1,8 +1,8 @@
1−# `:shoe`, `$_`, "buccab", `{$shoe p/twig}`
1+# `:shoe, $_, "buccab", {$shoe p/twig}`
22
3−The product: a mold whose product is always `p`.
3+Type as a single example.
44
5−Usage: define a type as a single example.
5+Product: a mold whose product is always `p`.
66
77Regular form: *1-fixed*.
88
docs/system/hoon/runes/bc/bank.md → docs/system/hoon/runes/bc/bccl.mdrenamed+3−3
@@ -1,8 +1,8 @@
1−# `:bank`, `$:`, "buccol", `{$bank p/(list moss)}`
1+# `:bank, $:, "buccol", {$bank p/(list moss)}`
22
3−The product: a mold which applies the tuple `p` to its sample.
3+Tuple of molds
44
5−Usage: define a record type.
5+Product: a mold which applies the tuple `p` to its sample.
66
77Regular form: *running*.
88
docs/system/hoon/runes/bc/book.md → docs/system/hoon/runes/bc/bccn.mdrenamed+4−4
@@ -1,11 +1,11 @@
1−# `:book`, `$%`, "buctis", `{$book p/(list moss)}`
1+# `:book, $%, "buctis", {$book p/(list moss)}`
22
3−The product: a mold producing the tagged union of the molds in
3+Tagged union
4+
5+Product: a mold producing the tagged union of the molds in
46`p`, all of which must be of the form `:bank(stem bulb)`, where
57`stem` is an atomic mold.
68
7−Usage: define a type which is a tagged union.
8−
99Regular form: *running*.
1010
1111Examples:
docs/system/hoon/runes/bc/bchp.mdnew file+15
@@ -0,0 +1,15 @@
1+# `:lamb, $-, "buchep", {$lamb p/moss q/moss}`
2+
3+Function type.
4+
5+Product: a mold producing a gate accepting
6+
7+Regular form: *2-fixed*.
8+
9+Example:
10+```
11+~zod:dojo> =a :lamb($foo $bar)
12+
13+~zod:dojo> ($:a %foo)
14+%bar
15+```
docs/system/hoon/runes/bc/bush.md → docs/system/hoon/runes/bc/bcpm.mdrenamed+4−5
@@ -1,10 +1,9 @@
1−# `:bush`, `$&`, "bucpam", `{$bush p/moss q/moss}`
1+# `:bush, $&, "bucpam", {$bush p/moss q/moss}`
22
3−The product: a mold which applies `p` if the head of its sample
4−is a cell, `q` if the head of its sample is a cell.
3+Union of two cells: one w/cellular head & other w/atomic head.
54
6−Usage: add a default pair behavior (like "autocons" in Nock
7−formulas) to a tagged union type.
5+Product: a mold which applies `p` if the head of its sample
6+is a cell, `q` if the head of its sample is a cell.
87
98Regular form: *2-fixed*.
109
docs/system/hoon/runes/bc/claw.md → docs/system/hoon/runes/bc/bcpt.mdrenamed+4−4
@@ -1,9 +1,9 @@
1−# `:claw`, `$@`, "bucpat", `{$claw p/moss q/moss}`
1+# `:claw, $@, "bucpat", {$claw p/moss q/moss}`
22
3−The product: a mold which applies `p` if its sample is an atom,
4−`q` if its sample is a cell.
3+Type: either an atom or a cell.
54
6−Usage: define a type which is either an atom or a cell.
5+Product: a mold which applies `p` if its sample is an atom,
6+`q` if its sample is a cell.
77
88Regular form: *2-fixed*.
99
docs/system/hoon/runes/bc/bcts.mdnew file+21
@@ -0,0 +1,21 @@
1+# `:coat, $=, "buctis", {$coat p/@tas q/moss}`
2+
3+Add variable name
4+
5+Product: a mold which puts the label `p` on the mold `q`.
6+
7+Regular form: *2-fixed*.
8+
9+Irregular form:
10+```
11+a/b :coat(a b)
12+```
13+
14+Examples:
15+
16+```
17+~zod:dojo> =a :coat(p $foo)
18+
19+~zod:dojo> (a %bar)
20+p=%foo
21+```
docs/system/hoon/runes/bc/bcwt.mdnew file+23
@@ -0,0 +1,23 @@
1+# `:pick, $?, "bucwut", {$? p/(list moss)}`
2+
3+Generalized type union.
4+
5+Product: a mold which tries each of the alternatives in `p`.
6+
7+Note: Use `:pick` only if none of `:book` (`$%`), `:claw` (`$@`) or `:bush` (`$&`) applies.
8+
9+Regular form: *running*.
10+
11+Example:
12+```
13+~zod:dojo> =a :pick($foo $bar $baz)
14+
15+~zod:dojo> (a %baz)
16+%baz
17+
18+~zod:dojo> (a [37 45])
19+%foo
20+
21+~zod:dojo> $:a
22+$foo
23+```
docs/system/hoon/runes/bc/coat.mddeleted−21
@@ -1,21 +0,0 @@
1−# `:coat`, `$=`, "buctis", `{$coat p/@tas q/moss}
2−
3−The product: a mold which puts the label `p` on the mold `q`.
4−
5−Usage: name a typed attribute or variable.
6−
7−Regular form: *2-fixed*.
8−
9−Irregular form:
10−```
11−a/b :coat(a b)
12−```
13−
14−Examples:
15−
16−```
17−~zod:dojo> =a :coat(p $foo)
18−
19−~zod:dojo> (a %bar)
20−p=%foo
21−```
docs/system/hoon/runes/bc/lamb.mddeleted−15
@@ -1,15 +0,0 @@
1−# `:lamb`, `$-`, "buchep", `{$lamb p/moss q/moss}`
2−
3−The product: a mold producing a gate accepting
4−
5−Usage: define a function type.
6−
7−Regular form: *2-fixed*.
8−
9−Example:
10−```
11−~zod:dojo> =a :lamb($foo $bar)
12−
13−~zod:dojo> ($:a %foo)
14−%bar
15−```
docs/system/hoon/runes/bc/pick.mddeleted−29
@@ -1,29 +0,0 @@
1−# `:pick`, `$?`, "bucwut", `{$? p/(list moss)}`
2−
3−The product: a mold which tries each of the alternatives in `p`.
4−
5−Usage: a generalized type union. Use `:pick` only if none of
6−`:book` (`$%`), `:claw` (`$@`) or `:bush` (`$&`) applies.
7−
8−Regular form: *running*.
9−
10−Irregular form:
11−
12−```
13−?(a b c) $?(a b c)
14−```
15−
16−Example:
17−
18−```
19−~zod:dojo> =a :pick($foo $bar $baz)
20−
21−~zod:dojo> (a %baz)
22−%baz
23−
24−~zod:dojo> (a [37 45])
25−%foo
26−
27−~zod:dojo> $:a
28−$foo
29−```
docs/system/hoon/runes/br/brcb.md+14−31
@@ -2,40 +2,23 @@
22sort: 7
33---
44
5−`|_ barcab`
6−===========
5+# `:door`, `|_`, "buccab", `{$door p/moss q/(map term twig)}`
76
87Door: core with sample (input values).
98
10−Similar to [`|%`](), but also takes input data (aka [sample]())
11−available within the entire core. Cores of this type are called doors.
12−Moreover, `|_` only accepts [dry or `%elm`]() arms--in other words,
13−type checking on these arms is performed on the input before computation.
14−
15−Produces
16−--------
17−
18−Twig: `[%brcb p=twig q=(map term foot)]`
9+Produces: a core whose sample is `p` and arms are `q`.
1910
20−Accepts
21−-------
11+Regular form: *1-fixed*, then *battery*
2212
23−`p` is a a [mold](). `q` is a [`++map`]() with [`++term`]() keys and
24−[`++foot`]() values.
25−
26−Tall form
27−---------
28−
29− |_ p
30− ++ p.n.q
31− q.n.q
32− --
13+Similar to `|%`, but also takes input data (aka sample)
14+available within the entire core. Cores of this type are called doors.
15+Moreover, `|_` only accepts dry or `%elm` arms--in other words,
16+type checking on these arms is performed on the input before computation.
3317
34−Examples
35−--------
18+Examples:
3619
3720 /~zod/try=> =mol
38− |_ a=@ud
21+ |_ a/@ud
3922 ++ succ +(a)
4023 ++ prev (dec a)
4124 --
@@ -44,14 +27,14 @@ Examples
4427 /~zod/try=> ~(succ mol ~(succ mol ~(prev mol 5)))
4528 6
4629
47−In this example we create a door `mol` that operates on a [`@ud`](),
30+In this example we create a door `mol` that operates on a `@ud`,
4831`a`. We add two arms to our door, `++succ` and `++prev`, and invoke them
49−with the irregular form of [`%~`](). Doors are commonly invoked with
32+with the irregular form of `%~`. Doors are commonly invoked with
5033`%~`, irregular form `~(arm door sample)`, which replaces the door's
5134sample and calls the specified arm.
5235
5336 /~zod/try=> =kom
54− |_ a=(list)
37+ |_ a/(list)
5538 ++ hed -.a
5639 ++ tal +.a
5740 --
@@ -73,7 +56,7 @@ sample and calls the specified arm.
7356
7457Here we're demonstrating the difference between `|_` and `|/`. We create
7558a nearly identical door using both runes, each with an arm that produces
76−the tail of the sample `a`. You can see that [wet]() functions use the
59+the tail of the sample `a`. You can see that wet functions use the
7760sample as a mold to produce well-typed output.
7861
7962 ++ ne
@@ -99,5 +82,5 @@ arms who all take the same sample.
9982
10083Here we put `++ne` to work a bit. Our first call renders 12 in base 16.
10184Since `99` is within the ASCII character range, we can cast it to a
102−[`@t`]() and get `'c'`. Conveniently, casting `12` to a [`@ux`]()
85+`@t` and get `'c'`. Conveniently, casting `12` to a `@ux`
10386results in `0xc`.
docs/system/hoon/runes/br/brcn.md+19−58
@@ -2,42 +2,20 @@
22sort: 1
33---
44
5−`|% barcen`
6−===========
5+# `:core, |%, "buccab", {$shoe p/twig}`
76
87Generic core.
98
10−Constructs a generic core with n named expressions, closed with `--`. Cores are
11−similar to an object with named properties (aka [arms]()) that can contain either functions or data. Accepts both [dry or `%elm`]() and [wet or `%ash`]() arms.
9+Produces: a core with `p`, an associative array with `++term` keys and `++foot` values.
1210
13−Produces
14−--------
11+Regular form: *Battery*
1512
16−Twig: `[%brcn p=(map term foot)]`
17−
18−Accepts
19−-------
20−
21−`p` is a [`++map`]() with [`++term`]() keys and [`++foot`]() values, which
22−are called arms.
23−
24−Tall form
25−---------
26−
27− |%
28− ++ p.n.q
29− q.n.q
30− +- p.n.l.q
31− q.n.l.q
32− --
33−
34−Examples
35−--------
13+Example:
3614
3715 /~zod/try=>
3816 =a |%
3917 ++ n 100
40− ++ g |= b=@
18+ ++ g |= b/@
4119 (add b n)
4220 --
4321 new var %a
@@ -54,7 +32,7 @@ function. `g` adds our constant `n` to whatever is passed to it.
5432 ++ r 100
5533 ++ s 4
5634 --
57− ++ g |= b=@
35+ ++ g |= b/@
5836 (div (add b r:l) s:l)
5937 --
6038 changed %a
@@ -67,36 +45,19 @@ and make our function `g` a bit more complicated. `g` now computes the
6745sum of its argument and the arm `r` inside `l`, and divides that by `s`
6846inside `l`.
6947
70− ++ yo
71− |% ++ cet 36.524 :: (add 24 (mul 100 365))
72− ++ day 86.400 :: (mul 24 hor)
73− ++ era 146.097 :: (add 1 (mul 4 cet))
74− ++ hor 3.600 :: (mul 60 mit)
75− ++ jes 106.751.991.084.417 :: (mul 730.692.561 era)
76− ++ mit 60
77− ++ moh `(list ,@ud)`[31 28 31 30 31 30 31 31 30 31 30 31 ~]
78− ++ moy `(list ,@ud)`[31 29 31 30 31 30 31 31 30 31 30 31 ~]
79− ++ qad 126.144.001 :: (add 1 (mul 4 yer))
80− ++ yer 31.536.000 :: (mul 365 day)
81− --
82−
83−[`++yo`](), found in `hoon.hoon`, uses `|%` to create a core whose arms
84−contain constant data for calculating time. As the following examples
85−shows, `|%` is also used to encapsulate arms that perform calculations.
86−
8748 ++ si :: signed integer
8849 |%
89− ++ abs |=(a=@s (add (end 0 1 a) (rsh 0 1 a)))
90− ++ dif |=([a=@s b=@s] (sum a (new !(syn b) (abs b))))
91− ++ dul |=([a=@s b=@] =+(c=(old a) ?:(-.c (mod +.c b) (sub b +.c))))
92− ++ fra |= [a=@s b=@s]
50+ ++ abs |=(a/@s (add (end 0 1 a) (rsh 0 1 a)))
51+ ++ dif |=([a/@s b/@s] (sum a (new !(syn b) (abs b))))
52+ ++ dul |=([a/@s b/@] =+(c=(old a) ?:(-.c (mod +.c b) (sub b +.c))))
53+ ++ fra |= [a/@s b/@s]
9354 (new =(0 (mix (syn a) (syn b))) (div (abs a) (abs b)))
94− ++ new |=([a=? b=@] `@s`?:(a (mul 2 b) ?:(=(0 b) 0 +((mul 2 (dec b))))))
95− ++ old |=(a=@s [(syn a) (abs a)])
96− ++ pro |= [a=@s b=@s]
55+ ++ new |=([a/? b/@] `@s`?:(a (mul 2 b) ?:(=(0 b) 0 +((mul 2 (dec b))))))
56+ ++ old |=(a/@s [(syn a) (abs a)])
57+ ++ pro |= [a/@s b/@s]
9758 (new =(0 (mix (syn a) (syn b))) (mul (abs a) (abs b)))
98− ++ rem |=([a=@s b=@s] (dif a (pro b (fra a b))))
99− ++ sum |= [a=@s b=@s]
59+ ++ rem |=([a/@s b/@s] (dif a (pro b (fra a b))))
60+ ++ sum |= [a/@s b/@s]
10061 ~| %si-sum
10162 =+ [c=(old a) d=(old b)]
10263 ?: -.c
@@ -110,10 +71,10 @@ shows, `|%` is also used to encapsulate arms that perform calculations.
11071 (new | (sub +.c +.d))
11172 (new & (sub +.d +.c))
11273 (new | (add +.c +.d))
113− ++ sun |=(a=@u (mul 2 a))
114− ++ syn |=(a=@s =(0 (end 0 1 a)))
74+ ++ sun |=(a/@u (mul 2 a))
75+ ++ syn |=(a/@s =(0 (end 0 1 a)))
11576 --
11677
117−[`++si`](), found in `hoon.hoon`, uses `|%` to create a core whose arms
118−contain functions used to calculate with signed integers, [`@s`](). In this
78+`++si`, found in `hoon.hoon`, uses `|%` to create a core whose arms
79+contain functions used to calculate with signed integers, `@s`. In this
11980case our core is made up entirely of functions.
docs/system/hoon/runes/br/brdt.md+6−25
@@ -2,34 +2,15 @@
22sort: 3
33---
44
5−`|. bardot`
6−===========
5+# `:trap. |., "bardot", {$trap p/twig}`
76
8−Trap: `|=` with no argument & not called automatically.
7+Trap: `|=` with no argument; expression not evaluated automatically.
98
10−Similar to `|=` except that it takes no arguments and is not automatically
9+Produces: a core with a single arm `$` that it takes no arguments and is not automatically
1110called (you must activate it with the irregular wideform of `%-`, which is
12−`()`. More specifically, its single arm [$]() (the empty name) is not automatically called when the [core]() is constructed. The core produced is both [dry] and [`%gold`](). Used to prevent thunk. XX
11+`()`).
1312
14−Produces
15−--------
16−
17−Twig: `[%brdt p=twig]`
18−
19−Accepts
20−-------
21−
22−`p` is a [`++twig`]().
23−
24−Tall form
25−---------
26−
27− |. p
28−
29−Wide form
30−---------
31−
32− |.(p)
13+Regular form: *1-fixed*
3314
3415Examples
3516--------
@@ -68,7 +49,7 @@ Examples
6849
6950This is a simple example. We assign a shell variable `a` to be a trap
7051that simply produces the atom `42`. Printing `a` prints the core and its
71−context. Calling `a` using `(`, the irregular form of [`%-`](), produces
52+context. Calling `a` using `(`, the irregular form of `%-`, produces
7253its value. As does pulling the arm `$` from inside it using `$:a`.
7354
7455 /~zod/try=>
docs/system/hoon/runes/br/brfs.mddeleted−93
@@ -1,93 +0,0 @@
1−---
2−sort: 8
3−---
4−
5−`|/ barfas`
6−===========
7−
8−`|_` with well typed output.
9−
10−Similar to `|_` except that it takes and produces well-typed output. XX
11−
12−`|/` is a synthetic rune that produces a [`%gold`]() [door]() with
13−[sample]() `[%bctr p]` and list of [wet or %ash]() [arm]()s `q`. The list of arms must be
14−closed with a `--`.
15−
16−Produces
17−--------
18−
19−Twig: `[%brfs p=mold q=(map term foot)]`
20−
21−Accepts
22−-------
23−
24−`p` is a [mold](). `q` is a [`++map`]() with [`++term`]() keys and
25−[`++foot`]() values.
26−
27−Tall form
28−---------
29−
30− |/ p
31− +- p.n.q
32− q.n.q
33− --
34−
35−Examples
36−--------
37−
38− /~zod/try=> =fas |/
39− a=@
40− +- two (mul a 2)
41− +- for (div a 2)
42− --
43− new var %fas
44− /~zod/try=> ~(two fas 2)
45− 4
46− /~zod/try=> ~(for fas ~(for fas ~(two fas 12)))
47− 6
48−
49−In this simple example we're creating a door with two arms. One arm
50−divides our sample by two, the other divides by two.
51−
52− /~zod/try=> =kom
53− |_ a=(list)
54− ++ hed -.a
55− ++ tal +.a
56− --
57− new var %kom
58− /~zod/try=> =kot
59− |/ a=(list)
60− +- hed -.a
61− +- tal +.a
62− --
63− new var %kot
64− /~zod/try=> ~(tal kom "abc")
65− t=~[98 99]
66− /~zod/try=> ~(tal kot "abc")
67− t="bc"
68− /~zod/try=> ~(tal kot [1 2 3 ~])
69− [2 3 ~]
70− /~zod/try=> ~(tal kom [1 2 3 ~])
71− t=~[2 3]
72−
73−Here we're demonstrating the difference between `|_` and `|/`. We create
74−a nearly identical door using both runes, each with an arm that produces
75−the tail of the sample, `a`. You can see that our wet gates use the
76−[sample]() as a mold to produce well-typed output.
77−
78− ++ by :: map engine
79− ~/ %by
80− |/ a=(map)
81− ::
82− +- all
83− ~/ %all
84− |* b=$+(* ?)
85− |- ^- ?
86− ?@ a
87− &
88− ?&((b q.n.a) $(a l.a) $(a r.a))
89−
90−All of the container engines in `hoon.hoon` use `|/` to set up the mold
91−for their operations. In `++by`, the map engine, `|/` creates a door
92−that takes a map that is passed to its arms. See more about using `++by`
93−in the [library]().
docs/system/hoon/runes/br/brhp.md+5−25
@@ -2,35 +2,15 @@
22sort: 4
33---
44
5−`|- barhep`
6−===========
5+# `:loop, |-, "barfas", {$trap p/twig}`
76
87Trap: automatically called function with no arguments.
98
10−A function with no arguments that's automatically called when constructed. More specifically, it produces a [dry]() [%gold]() [core]() whose single [arm]() [$]() (the empty name) is automatically called when the core is constructed. Similar to creating and calling an anonymous function and is quite commonly used for loops or recursion.
9+Produces: a core whose single arm $ (the empty name) is automatically called when the core is constructed. Similar to creating and calling an anonymous function and is quite commonly used for loops or recursion.
1110
12−Produces
13−--------
11+Regular form: *1-fixed*
1412
15−[`++twig`]: `[%brhp p=twig]`
16−
17−Accepts
18−-------
19−
20−`p` is a twig
21−
22−Tall form
23−---------
24−
25− |- p
26−
27−Wide form
28−---------
29−
30− |-(p)
31−
32−Examples
33−--------
13+Examples:
3414
3515 /~zod/try=> |-(42)
3616 42
@@ -51,7 +31,7 @@ producing a nested tuple.
5131
5232 ++ dec :: decrement
5333 ~/ %dec
54− |= a=@
34+ |= a/@
5535 ~| %decrement-underflow
5636 ?< =(0 a)
5737 =+ b=0
docs/system/hoon/runes/br/brkt.md+12−32
@@ -2,36 +2,16 @@
22sort: 6
33---
44
5−`|^ barket`
6−===========
5+# `:cork`, `|^`, "barket", `{$cork p/twig q/(map term foot)}`
76
8−Same as `|-` except that it can contain internal arms.
7+Same as `|-` (expression evaluated automatically) except that it can contain internal arms.
98
10−`|^` is a synthetic rune that produces and then calls a [`%gold`]()
11−[book]() with sample `p` as a [`%$(p)`](), and a list of [arm]()s `q`.
9+Produces a `%gold` (XX elaborate on what gold, book mean?) book with sample `p` as a `%$(p)`, and a list of arms `q`.
1210`q` must be closed with a `--`.
1311
14−Produces
15−--------
12+Regular form: *1-fixed*
1613
17−Twig: `[%brkt p=twig q=(map term foot)]`
18−
19−Accepts
20−-------
21−
22−`p` is a [++twig](). `q` is a [`map`]() with [`++term`]() keys and
23−[`++foot`]() values, which are called arms.
24−
25−Tall form
26−---------
27−
28− |^ p
29− ++ p.n.q
30− q.n.q
31− --
32−
33−Examples
34−--------
14+Examples:
3515
3616 /~zod/try=> =+ a=21
3717 |^ [square double]
@@ -46,15 +26,15 @@ commonly used inside another gate or core.
4626
4727 ++ mum :: mug with murmur3
4828 ~/ %mum
49− |= a=*
29+ |= a/*
5030 |^ (trim ?@(a a (mix $(a -.a) (mix 0x7fff.ffff $(a +.a)))))
5131 ++ spec :: standard murmur3
52− |= [syd=@ key=@]
32+ |= [syd/@ key/@]
5333 ?> (lte (met 5 syd) 1)
5434 =+ ^= row
55− |= [a=@ b=@]
35+ |= [a/@ b/@]
5636 (con (end 5 1 (lsh 0 a b)) (rsh 0 (sub 32 a) b))
57− =+ mow=|=([a=@ b=@] (end 5 1 (mul a b)))
37+ =+ mow=|=([a/@ b/@] (end 5 1 (mul a b)))
5838 =+ len=(met 5 key)
5939 =- =. goc (mix goc len)
6040 =. goc (mix goc (rsh 4 1 goc))
@@ -63,7 +43,7 @@ commonly used inside another gate or core.
6343 =. goc (mow goc 0xc2b2.ae35)
6444 (mix goc (rsh 4 1 goc))
6545 ^= goc
66− =+ [inx=0 goc=syd]
46+ =+ [inx/0 goc/syd]
6747 |- ^- @
6848 ?: =(inx len) goc
6949 =+ kop=(cut 5 [inx 1] key)
@@ -76,7 +56,7 @@ commonly used inside another gate or core.
7656 $(inx +(inx))
7757 ::
7858 ++ trim :: 31-bit nonzero
79− |= key=@
59+ |= key/@
8060 =+ syd=0xcafe.babe
8161 |- ^- @
8262 =+ haz=(spec syd key)
@@ -85,5 +65,5 @@ commonly used inside another gate or core.
8565 --
8666 ::
8767
88−[`++mum`]() is a hashing gate, which uses two helper arms to compute
68+`++mum` is a hashing gate, which uses two helper arms to compute
8969its results. The `|^` at the top performs the computation.
docs/system/hoon/runes/br/brls.md+10−31
@@ -7,47 +7,26 @@ sort: 9
77
88Function with unreadable sample.
99
10−`|+` is a synthetic rune that produces a [dry]() [`%iron`]() function
11−with argument (aka [sample]()) [`$*(p)`]() and [arm]()s `q`. `|+` is similar to `|=`, but differs in that its input (sample) cannot be read and thus cannot interfere with the type system.
10+Produces:a dry `%iron` gate with argument (aka sample) `$*(p)` and arms
11+`q`. Similar to `|=`, but differs in that its input (sample) cannot be
12+read and thus cannot interfere with the type system.
1213
13−Produces
14−--------
14+Examples:
1515
16−Twig: `[%brls p=mold q=twig]`
17−
18−Accepts
19−-------
20−
21−`p` is a [mold](). `q` is a [`++twig`]().
22−
23−Tall form
24−---------
25−
26− |+ p
27− q
28−
29−Wide form
30−---------
31−
32− |+(p q)
33−
34−Examples
35−--------
36−
37− ~zod/try=> +<:|+(a=@ a)
16+ ~zod/try=> +<:|+(a/@ a)
3817 ! -axis.6
3918 ! peek-park
4019 ! exit
41− ~zod/try=> +<:|=(a=@ a)
20+ ~zod/try=> +<:|=(a/@ a)
4221 a=0
4322
44−Here we're trying to read the sample, using the [head]() of the [tail]() of two different kinds of functions. With `|+` you can see we cause an error, whereas with `|=` our default sample is `a=0`.
23+Here we're trying to read the sample, using the head of the tail of two different kinds of functions. With `|+` you can see we cause an error, whereas with `|=` our default sample is `a=0`.
4524
46− ~zod/try=> %.(20 |+(a=@ a))
25+ ~zod/try=> %.(20 |+(a/@ a))
4726 20
48− ~zod/try=> %.(20 |=(a=@ a))
27+ ~zod/try=> %.(20 |=(a/@ a))
4928 20
50− ~zod/try=> %.(20 |+(a=@ (add a 12)))
29+ ~zod/try=> %.(20 |+(a/@ (add a 12)))
5130 32
5231
5332Kicking a `|+` gate, however, is the same as `|=`.
docs/system/hoon/runes/br/brtr.md+10−32
@@ -2,42 +2,20 @@
22sort: 10
33---
44
5−`|* bartar`
6−===========
5+# `:gill`, `|*`, "bartar", `{$gill p/twig q/twig}`
76
8−Wet function.
7+Function with arguments; type checking at call time
98
10−Similar to `|=` except that it does type checking at
11−call time, and that the product type is checked to be the same as
12−the input type (in other words it's [wet]()), rather than the input ([sample]()) [mold]().
9+Produces: a gate with argument `p` and body `q`. Type checking happens at
10+call time.
1311
14−Produces
15−--------
12+Regular form: *1-fixed*, followed by Battery
1613
17−Twig: `[%brtr p=mold q=twig]`
14+Examples:
1815
19−Accepts
20−-------
21−
22−`p` is a mold. `q` is a [++twig]().
23−
24−Tall form
25−---------
26−
27− |* p
28− q
29−
30−Wide form
31−---------
32−
33− |*(p q)
34−
35−Examples
36−--------
37−
38− ~zod/try=> %.('c' |*(a=@ a))
16+ ~zod/try=> %.('c' |*(a/@ a))
3917 'c'
40− ~zod/try=> %.('c' |=(a=@ a))
18+ ~zod/try=> %.('c' |=(a/@ a))
4119 99
4220
4321This is a concise way of understanding the difference between `|*` and
@@ -48,7 +26,7 @@ input sample type.
4826
4927 ++ flop :: reverse
5028 ~/ %flop
51− |* a=(list)
29+ |* a/(list)
5230 => .(a (homo a))
5331 ^+ a
5432 =+ b=`_a`~
@@ -57,6 +35,6 @@ input sample type.
5735 b
5836 $(a t.a, b [i.a b])
5937
60−In [`++flop`](), `|*` is used so the type information within the passed
38+In `++flop`, `|*` is used so the type information within the passed
6139in list is maintained. Without a `|*`, any cords would be cast to nouns
6240as in our previous example.
docs/system/hoon/runes/br/brts.md+6−35
@@ -2,45 +2,16 @@
22sort: 2
33---
44
5−`|= bartis`
6−===========
5+# `:gate`, `|=`, "bartis", `{$gate p/twig q/twig}`
76
87Function with argument(s).
98
10−`|=`, is a synthetic rune that produces a [dry]() [`%gold`]() gate with
11−sample [`$*(p)`](), arm `q`. A gate is a core with one arm, [`$`](), the
12−empty name. `|=` checks its input sample against its [mold](), `p`.
13−
14−`|=` is similar to a function that takes a defined input and produces
15−the result of some computation. `|=` differs from `|*` in that its
16−typechecking occurs at compile-time to ensure that all inputs match its
17−sample mold.
18−
19−Produces
20−--------
21−
22−Twig: `[%brts p=mold q=twig]`
23−
24−Accepts
25−-------
26−
27−`p` is a mold. `q` is a twig.
28−
29−Tall form
30−---------
31−
32− |= p
33− q
34−
35−Wide form
36−---------
37−
38− |=(p q)
9+Produces: a dry `%gold` gate with sample `$*(p)`, arm `q`. A gate is a core with one arm, `$`, the
10+empty name.
3911
4012Examples
41−--------
4213
43− ~zod/try=> =inc |=(a=@ +(a))
14+ ~zod/try=> =inc |=(a/@ +(a))
4415 ~zod/try=> (inc 20)
4516 21
4617
@@ -50,13 +21,13 @@ arguments.
5021
5122 ++ add :: add
5223 ~/ %add
53− |= [a=@ b=@]
24+ |= [a/@ b=@]
5425 ^- @
5526 ?: =(0 a)
5627 b
5728 $(a (dec a), b +(b))
5829
59−In [++add](), from `hoon.hoon`, `|=` creates a gate whose sample takes
30+In ++add, from `hoon.hoon`, `|=` creates a gate whose sample takes
6031two atoms labeled `a` and `b`, and whose arm evaluates an expression
6132that produces the sum of the atoms by decrementing `a` until it is `0`
6233and incrementing `b` at each step. Here, `$` is used for recursion,
docs/system/hoon/runes/br/brwt.md+23−45
@@ -2,51 +2,29 @@
22sort: 5
33---
44
5−`|? barwut`
6−===========
5+# `:tray`, `|?`, "barwut", `{$tray p/twig}`
76
87`|-` with hidden context.
98
10−Similar to `|-` except for that the [sample]() and
11−[context]() of the core being passed is hidden in order to avoid
12−type conflicts with a core that has a different [sample]() and
13−context. In urbit language, `|?` produces a [dry]() [%lead]() trap.
14−
15−Produces
16−--------
17−
18−Twig: `[%brwt q=twig]`
19−
20−Accepts
21−-------
22−
23−`p` is a [++twig]().
24−
25−Tall form
26−---------
27−
28− |? p
29−
30−Wide form
31−---------
32−
33− |?(p)
34−
35−Examples
36−--------
37−
38− ~zod/try=> |?(20)
39− < 1?lld
40− [[[@da @ta] [@p @ta] *''] @n <250.yum 41.int 414.hhh 100.xkc 1.ypj %164>]
41− >
42− ~zod/try=> +:|?(20)
43− ! -axis.3
44− ! peek-park
45− ! exit
46− ~zod/try=> +:|.(20)
47− [ [[~2014.10.22..19.39.41..0440 ~.~2014.10.22..19.39.41..0440] [~zod ~.~zod] <||>]
48− ~
49− <250.yum 41.int 414.hhh 100.xkc 1.ypj %164>
50− ]
51−
52−A lead core's payload cannot be read or written.
9+Produces: a lead trap with expression `p` whose context is hidden to avoid type conflicts.
10+
11+Examples:
12+
13+ > |?(20)
14+ < 1?aoy
15+ { {a/^#3.?({i/@ud t/#3} ^#2.?({i/@ud t/#2} it(@ud))) our/@p now/@da eny/@uvI}
16+ $~
17+ <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>
18+ }
19+ > ~zod/try=> +:|?(20)
20+ > +:|.(20)
21+ [ [ a=[i=1 t=[i=2 t=[i=3 t=~]]]
22+ our=~sivtyv-barnel
23+ now=~2016.3.29..04.14.18..9a26
24+ eny=0v16.dkepv.qm6er.7v2mh.kcdva.oisv9.th4dl.era7v.pj315.fd6la.76d34
25+ ]
26+ ~
27+ <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>
28+ ]
29+
30+As demonstrated above, a lead core's payload cannot be read or written.
docs/system/hoon/runes/cl/clcb.md+5−26
@@ -1,33 +1,12 @@
1−`:_ colcab`
2−===========
1+# `:scon`, `:_`, "colcab", `{$scon p/twig q/twig}`
32
43Inverted tuple of `p` `q`.
54
6−Exists for code readability and organization. See the [backstep]() convention.
5+Produces: a cell of `[q p]`. Exists for code readability and organization. See the backstep convention.
76
8−Produces
9−--------
7+Regular form: *2-fixed*
108
11−Twig: `[%clcb p=twig q=twig]`
12−
13−Accepts
14−-------
15−
16−`p` is a [++twig](). `q` is a twig.
17−
18−Tall form
19−---------
20−
21− :_ p
22− q
23−
24−Wide form
25−---------
26−
27− :_(p q)
28−
29−Examples
30−--------
9+Examples:
3110
3211 ~zod/try=> :_(1 2)
3312 [2 1]
@@ -38,7 +17,7 @@ reverse order.
3817 ~zod/try=> `tape`:_(~ 'a')
3918 "a"
4019
41−Since a [`++tape`]() is a null-terminated list of characters, casting
20+Since a `++tape` is a null-terminated list of characters, casting
4221the result of `:_(~ 'a')` to a `tape` produces `"a"`.
4322
4423 /~zod/try=>
docs/system/hoon/runes/cl/clfs.md+2−23
@@ -1,33 +1,12 @@
11`:/ colfas`
22===========
33
4−String to XML XX.
4+String to XML XX
55
66`:/`, `colfas`, is a synthetic rune that produces `[%$ [%$ p ~] ~]`,
77i.e., `[0 [0 p 0] 0]`.
88
9−Produces
10−--------
11−
12−Twig: `[%clfs p=twig]`
13−
14−Accepts
15−-------
16−
17−`p` is a [`++twig`]()
18−
19−Tall form
20−---------
21−
22− :/ p
23−
24−Wide form
25−---------
26−
27− :/(p)
28−
29−Examples
30−--------
9+Examples:
3110
3211 ~zod/try=> :/(20)
3312 [[%~. [%~. 20] ~] ~]
docs/system/hoon/runes/cl/clhp.md+15−29
@@ -1,36 +1,22 @@
1−`:- colhep`
2−===========
1+# `:cons`, `:-`, "colhep", `{$cons p/twig q/twig}`
32
43Tuple of two.
54
6−Produces
7−--------
5+Produces: a cell of `p` and `q`.
86
9−Twig: `[%clhp p=twig q=twig]`
7+Regular form: *2-fixed*
108
11−Accepts
12−-------
9+Irregular forms:
1310
14−`p` is a [++twig](). `q` is a twig.
11+```
12+[a b] :-(a b)
13+1^2^3 [1 2 3]
14+a+1 [%a 1]
15+`1 [~ 1]
16+[1 2]~ [[1 2] ~]
17+```
1518
16−Tall form
17−---------
18−
19− :- p
20− q
21−
22−Wide form
23−---------
24−
25− :-(p q)
26−
27−Irregular form
28−--------------
29−
30− [p q]
31−
32−Examples
33−--------
19+Examples:
3420
3521 ~zod/try=> :-(1 2)
3622 [1 2]
@@ -66,7 +52,7 @@ Some obscure `:-` irregular forms
6652 ~zod/main=/app> a/'twig'
6753 [%a 'twig']
6854
69−Like `^`, but first item must be a [`++term`](), and is [cube]()d. Used to construct [`path`]()s and [frond]().
55+Like `^`, but first item must be a `++term`, and is cubed. Used to construct `path`s and frond.
7056
7157### Prefix `` ` ``, postfix `~`
7258
@@ -75,5 +61,5 @@ Like `^`, but first item must be a [`++term`](), and is [cube]()d. Used to const
7561 ~zod/main=/app> [42 30]~
7662 [[42 30] ~]
7763
78−Complimenting each other, these construct pairs with `~` in the [head]() and
79−[`tail`]() respectively. Multiple postfix `~` do not work for unknown reasons.
64+Complimenting each other, these construct pairs with `~` in the head and
65+`tail` respectively. Multiple postfix `~` do not work for unknown reasons.
docs/system/hoon/runes/cl/clkt.md+3−36
@@ -1,45 +1,12 @@
1−`:^ colket`
2−===========
1+# `:conq`, `:^`, "colket", `{$conq p/twig q/twig r/twig s/twig}`
32
43Tuple of four.
54
6−Produces
7−--------
5+Produces: the tuple of `[p q r s]`.
86
9−Twig: `[%clkt p=twig q=twig r=twig s=twig]`
10−
11−Accepts
12−-------
13−
14−`p` is a [++twig](). `q` is a twig. `r` is a twig. `s` is a
15−twig.
16−
17−Tall form
18−---------
19−
20−Kingside:
21−
22− :^ p
23− q
24− r
25− s
26−
27−Queenside:
28−
29− :^ p q
30− r
31− s
32−
33− :^ p q r
34− s
35−
36−Wide form
37−---------
38−
39− :^(p q r s)
7+Regular form: *4-fixed*
408
419Examples
42−--------
4310
4411 /~zod/try=> :^(1 2 3 4)
4512 [1 2 3 4]
docs/system/hoon/runes/cl/clls.md+5−29
@@ -1,39 +1,15 @@
1−`:+ collus`
1+# `:cont`, `:+`, "collus", `{$cont p/twig q/twig r/twig}`
22===========
33
44Tuple of 3.
55
6−Produces
7−--------
6+Produces: the tuple of `p`, `q`, and `r`.
87
9−Twig: `[%clls p=twig q=twig r=twig]`
8+Regular form:
109
11−Accepts
12−-------
10+*3-fixed*
1311
14−`p` is a [++twig](). `q` is a twig. `r` is a twig.
15−
16−Tall form
17−---------
18−
19−Kingside:
20−
21− :+ p
22− q
23− r
24−
25−Queenside:
26−
27− :+ p q
28− r
29−
30−Wide form
31−---------
32−
33− :+(p q r)
34−
35−Examples
36−--------
12+Examples:
3713
3814 /~zod/try=> :+ 1
3915 2
docs/system/hoon/runes/cl/clsg.md+5−32
@@ -1,40 +1,13 @@
1−`:~ colsig`
1+# `:conl`, `:~`, "colsig", `{$conl p/(list twig)}`
22===========
33
44Null-terminated tuple of n elements.
55
6−Closed with `==`.
6+Produces: tuple of input elements. Closed with `==` in tall form.
77
8−Produces
9−--------
8+Regular form: *running*
109
11−Twig: `[%clsg p=tusk]`
12−
13−Accepts
14−-------
15−
16−`p` is a [`++tusk`](), a list of [`++twig`]()s.
17−
18−Tall form
19−---------
20−
21− :~ i.p
22− i.t.p
23− i.t.t.p
24− ==
25−
26−Wide form
27−---------
28−
29− :~(i.p i.t.p i.t.t.p)
30−
31−Irregular form
32−--------------
33−
34− ~[i.p i.t.p i.t.t.p]
35−
36−Examples
37−--------
10+Examples:
3811
3912 /~zod/try=> :~(5 3 4 2 1)
4013 [5 3 4 2 1 ~]
@@ -61,7 +34,7 @@ This is the most straightforward case of `:~`, producing a tuple in wide, irregu
6134 ~[1 2 4 3 5]
6235
6336In this example we use `%-` to pass the results of our previous example
64−to [`++limo`](), which creates a [`++list`](), and [`++flop`](), which
37+to `++limo`, which creates a `++list`, and `++flop`, which
6538reverses its order. This example shows how `:~` is commonly useful.
6639Null-terminated tuples are easily converted to lists, which are
6740frequently encountered in hoon.
docs/system/hoon/runes/cl/cltr.md+3−30
@@ -1,37 +1,10 @@
1−`:* coltar`
2−===========
1+# `:conp`, `:*`, "coltar", {$conp p/(list twig)}
32
43Tuple of n elements.
54
6−Closed with `==`.
5+Produces: tuple of input elements. Closed with `==`.
76
8−Produces
9−--------
10−
11−Twig: `[%cltr p=tusk]`
12−
13−Accepts
14−-------
15−
16−`p` is a [`++tusk`](), a list of [++twig]()s.
17−
18−Tall form
19−---------
20−
21− :~ i.p
22− i.t.p
23− i.t.t.p
24− ==
25−
26−Wide form
27−---------
28−
29− :*(i.p i.t.p i.t.t.p)
30−
31−Irregular form
32−--------------
33−
34− [i.p i.t.p i.t.t.p]
7+Regular form: *running*
358
369Examples
3710--------
docs/system/hoon/runes/dt/dtkt.md+7−46
@@ -1,51 +1,12 @@
1−`.^ dotket`
2−===========
1+# `:wish`, `.^`, "dotket", `{$wish p/twig q/twig}`
32
4−Nock 11.
3+Nock 11--grab a file from namespace.
54
6−Generates nock operator `11`, which--in virtual userspace
7−nock, [`++mock`]()--loads a file from the global namespace, [%clay]().
5+Generates: nock operator `11`, which--in virtual userspace
6+nock, `++mock`--loads a file from the global namespace, %clay.
87
8+Regular form: *2-fixed*
99
10−Produces
11−--------
10+Examples:
1211
13−Twig: `[%dtkt p=twig]`
14−
15−Accepts
16−-------
17−
18−`p` is a [`++twig`]().
19−
20−Tall form
21−---------
22−
23− .^ p
24−
25−Wide form
26−---------
27−
28− .^(p)
29−
30−Examples
31−--------
32−
33− ~zod/try=> .^(a//=name=/~zod)
34− 587.481.414.525.965.665.129.596
35− ~zod/try=> (,@t .^(a//=name=/~zod))
36− '|Tianming|'
37−
38−First we use `.^` to load the contents of `a//=name=/~zod` as a noun.
39−Subsequently using `,@t` to cast to a cord, we can see that the contents
40−are `'|Tianming|'`.
41−
42− ~zod/try=> :into %/test 'hello'
43− + /~zod/try/2/test
44− ~zod/try=> .^(cx/%/test)
45− 478.560.413.032
46− ~zod/try=> (,@t .^(cx/%/test))
47− 'hello'
48−
49−This is similar to the previous example, but uses our simple `:into`
50−program to write a cord to a file. Then we follow the above method to
51−confirm its contents.
12+XX Something wasn't working for me and didn't want to waste time.
docs/system/hoon/runes/dt/dtls.md+5−27
@@ -1,38 +1,16 @@
1−`.+ dotlus`
2−===========
1+# `:bump`, `.+` "dotlus" `{$bump p/twig}`
32
43Increments an atom.
54
6−`.+` is a natural rune that generates nock operator `4`, which
7−increments an operand that's an atom.
5+Generates: nock operator `4`, which increments atom `p`.
86
9−Accepts
10−--------
7+Regular form: *1-fixed*
118
12−Twig: `[%dtls p=twig]`
9+Irregular form:
1310
14−Sample
15−------
16−
17−`p` is a [`++twig`]()
18−
19−Tall form
20−---------
21−
22− .+ p
23−
24−Wide form
25−---------
26−
27− .+(p)
28−
29−Irregular form
30−--------------
31−
32− +(p)
11+`+(6) .+(6)`
3312
3413Examples
35−--------
3614
3715 ~zod/try=> +(6)
3816 7
docs/system/hoon/runes/dt/dttr.md+4−31
@@ -1,38 +1,11 @@
1−`.* dottar`
2−===========
1+# `:bump`, `{$bump p/twig}`
32
43Compute nock.
54
6−Computes nock expressions. Runs nock formula `q` on
5+Computes: nock expressions. Runs nock formula `q` on
76nock subject `p`.
87
9−`.*` is a natural rune that calculates the nock of subject `p` and
10−formula `q`. `.*` makes it possible to compute nock formulas in user
11−space.
12−
13−Produces
14−--------
15−
16−Twig: `[%dttr p=twig q=twig]`
17−
18−Accepts
19−-------
20−
21−`p` is a [twig](). `q` is a [twig]().
22−
23−Tall form
24−---------
25−
26− .* p
27− q
28−
29−Wide form
30−---------
31−
32− .*(p q)
33−
34−Examples
35−--------
8+Examples:
369
3710 ~zod/try=> .*([20 30] [0 2])
3811 20
@@ -47,4 +20,4 @@ Examples
4720 ~zod/try=> .*(~ [5 1^5 [4 1^3]])
4821 1
4922
50−See the [nock tutorial]() for further discussion of Nock.
23+See the nock tutorial for further discussion of Nock.
docs/system/hoon/runes/dt/dtts.md+6−32
@@ -1,38 +1,12 @@
1−`.= dottis`
2−===========
1+# `:same`, `.=`, "dottis", `{$same p/twig q/twig}`
32
43Test equality.
54
6−Nock operator 5: tests two nouns `p` and `q` for equality, producing a boolean.
5+Generates: Nock operator 5. Tests two nouns `p` and `q` for equality, producing a boolean.
76
8−Produces
9−--------
7+Regular form: *2-fixed*
108
11−Twig: `[%dtts p=twig q=twig]`
12−
13−Accepts
14−-------
15−
16−`p` is a [`++twig`](). `q` is a twig.
17−
18−Tall form
19−---------
20−
21− .= p
22− q
23−
24−Wide form
25−---------
26−
27− .=(p q)
28−
29−Irregular form
30−--------------
31−
32− =(p q)
33−
34−Examples
35−--------
9+Examples:
3610
3711 ~zod/try=> =(0 0)
3812 %.y
@@ -55,7 +29,7 @@ of each `p` and `q`. In the first case of this example the tape `"a"` is
5529actually the list `[97 0]` since the ASCII code for `'a'` is 97. The
5630following cases serve to show similar implicit down-casts.
5731
58− /~zod/try=> =isa |= a=@t
32+ /~zod/try=> =isa |= a/@t
5933 ?: =(a 'a')
6034 'yes a'
6135 'not a'
@@ -65,7 +39,7 @@ following cases serve to show similar implicit down-casts.
6539 /~zod/try=> (isa 'a')
6640 'yes a'
6741
68−In common practice `.=` is often used inside of [`?`]() runes, where
42+In common practice `.=` is often used inside of `?` runes, where
6943switching on equality is needed. Here we construct a simple function to test
7044if our argument is equal to `'a'` and produce either `'yes a'` or
7145`'not a'` accordingly.
docs/system/hoon/runes/dt/dtwt.md+4−24
@@ -1,33 +1,13 @@
1−`.? dotwut`
2−===========
1+# `:deep`, `.?`, "dotwut", `{$deep p/twig}`
32
43Test if noun is cell or atom.
54
6−Nock operator 3: tests whether a noun is a cell or an
5+Generates: Nock operator 3. Tests whether a noun is a cell or an
76atom, producing true if it is the former and false if the latter.
87
9−Produces
10−--------
8+Regular form: *1-fixed*
119
12−Twig: `[%dtwt p=twig]`
13−
14−Accepts
15−-------
16−
17−`p` is a [`++twig`]().
18−
19−Tall form
20−---------
21−
22− .? p
23−
24−Wide form
25−---------
26−
27− .?(p)
28−
29−Examples
30−--------
10+Examples:
3111
3212 ~zod/try=> .?(~)
3313 %.n
docs/system/hoon/runes/dt/dtzy.mddeleted−47
@@ -1,47 +0,0 @@
1−`dotzay`
2−========
3−
4−Odored atom.
5−
6−`dotzay` is a natural rune that produces a non-cubed atomic constant of
7−odor `p` and value `q`. `dotzay` is never used explicitly, but always
8−implicitly to give odors to atoms.
9−
10−Produces
11−--------
12−
13−Twig: `[%dtzy p=term q=@]`
14−
15−Sample
16−------
17−
18−`p` is a [`++term`](). `q` is an [atom]().
19−
20−Tall form
21−---------
22−
23−None
24−
25−Wide form
26−---------
27−
28−None
29−
30−Irregular form
31−--------------
32−
33−None
34−
35−Examples
36−--------
37−
38− ~zod/try=> (ream '12')
39− [%dtzy p=%ud q=12]
40− ~zod/try=> (ream '&')
41− [%dtzy p=%f q=0]
42− ~zod/try=> (ream '~.sam')
43− [%dtzy p=%ta q=7.168.371]
44−
45−Here we use [`++ream`]() to unpack how values are parsed. Passing what
46−what would appear to be constants reveals that they are in fact parsed
47−into an odor [`++term`] and their numeric atom representation.
docs/system/hoon/runes/dt/dtzz.mddeleted−47
@@ -1,47 +0,0 @@
1−`dotzaz`
2−========
3−
4−Cube.
5−
6−`dotzaz` is a natural rune that produces a cubed noun constant of value
7−`q` and odor `p`, if `q` is an atom. A cube is an atom whose type
8−contains only itself.
9−
10−Produces
11−--------
12−
13−Twig: `[%dtzz p=term q=*]`
14−
15−Sample
16−------
17−
18−`p` is a [`++term`](). `q` is an [noun]().
19−
20−Tall form
21−---------
22−
23−None
24−
25−Wide form
26−---------
27−
28−None
29−
30−Irregular form
31−--------------
32−
33−None
34−
35−Examples
36−--------
37−
38− ~zod/try=> (ream '%12')
39− [%dtzz p=%ud q=12]
40− ~zod/try=> (ream '%&')
41− [%dtzz p=%f q=0]
42− ~zod/try=> (ream '%sam')
43− [%dtzz p=%tas q=7.168.371]
44−
45−Here we use [`++ream`]() to unpack how values are parsed. Prefixing a
46−value with a `%` implicitly turns it into a `%cube` with the following
47−value: an odored noun.
docs/system/hoon/runes/kt/ktbr.md+8−28
@@ -1,36 +1,16 @@
1−`^| ketbar`
2−===========
1+# `:iron`, `^|`, "ketbar", `{$iron p/twig}`
32
43Make core context unreadable.
54
6−Converts a core to a core whose [context]() is unreadable. Useful in
7−preventing type fails when replacing one core with one context
8−with another core with a different context. In hoon-specific terminonlogy, `^|` is a natural rune that converts a [`%gold`]() core into an [`%iron`]() core.
5+Converts an %gold core `p` to an %iron core. Useful in preventing type
6+fails when replacing one core with one context with another core with a
7+different context.
98
10−Produces
11−--------
9+Regular form: *1-fixed*
1210
13−Twig: `[%ktbr p=twig]`
11+Examples:
1412
15−Accepts
16−-------
17−
18−`p` is a [`++twig`]().
19−
20−Tall form
21−---------
22−
23− ^| p
24−
25−Wide form
26−---------
27−
28− ^|(p)
29−
30−Examples
31−--------
32−
33− /~zod/try=> =cor |= a=@
13+ /~zod/try=> =cor |= a/@
3414 +(a)
3515 new var %cor
3616 /~zod/try=> +<.cor
@@ -43,4 +23,4 @@ Examples
4323 ! exit
4424
4525Here we crete a simple gate and assign it to the shell variable `cor`.
46−We can examine the sample of `cor` with `+<` (the [head]() of the [tail]()) to produce `a=0`. Assigning a new shell variable, `iro` as the `^|` of `cor` we can no longer peek in to its subject.
26+We can examine the sample of `cor` with `+<` (the head of the tail) to produce `a=0`. Assigning a new shell variable, `iro` as the `^|` of `cor` we can no longer peek in to its subject.
docs/system/hoon/runes/kt/ktdt.md+4−20
@@ -1,5 +1,4 @@
1−`^. ketdot`
2−===========
1+# `:ward`, `^.`, "ketdot", `{$ward p/twig q/twig}`
32
43Cast `q` to product type of `p`.
54
@@ -8,26 +7,11 @@ as casting `q` to the product type of `p`. Useful when you want
87to cast to the type of a function that you don't want to actually
98run at runtime.
109
11−Produces
12−--------
10+Regular form: *2-fixed*
1311
14−Twig: `[%ktdt p=twig q=twig]`
12+Examples:
1513
16−Accepts
17−-------
18−
19−`p` is a [`++twig`](). `q` is a twig.
20−
21−Tall form
22−---------
23−
24− ^. p
25− q
26−
27−Examples
28−--------
29−
30− /~zod/try=> =cor |= [~ a=@]
14+ /~zod/try=> =cor |= [~ a/@]
3115 [~ p=a]
3216 changed %cor
3317 /~zod/try=> ^.(cor [~ 97])
docs/system/hoon/runes/kt/kthp.md+8−28
@@ -1,38 +1,18 @@
1−`^- kethep`
2−===========
1+# `:cast`, `^-`, "kethep", `{$cast p/twig q/twig}`
32
43Cast.
54
6−Casts `q` to the [span]() of `p`. The same as `^+`, except for that `q` is actually cast to the bunt of `q` (`$,(q)`). The easiest way to make a basic cast. Used when you already have already created a validator function ([mold]()) for a span.
5+Casts `q` to the span of `p`. The same as `^+`, except for that `q` is actually cast to the bunt of `q` (`$,(q)`). The easiest way to make a basic cast; used when you already have already created a validator function (mold) for a span.
76
8−Produces
9−--------
7+Regular form: *2-fixed*
108
11−Twig: `[%kthp p=mold q=twig]`
9+Irregular form:
1210
13−Accepts
14−-------
1511
16−`p` is a mold. `q` is a [`++twig`]().
12+ `p`q ^-(p q)
1713
18−Tall form
19−---------
2014
21− ^- p
22− q
23−
24−Wide form
25−---------
26−
27− ^-(p q)
28−
29−Irregular form
30−--------------
31−
32− `p`q
33−
34−Examples
35−--------
15+Examples:
3616
3717 ~zod/try=> (add 90 7)
3818 97
@@ -45,8 +25,8 @@ Here we see a straightforward use of `^-` in both irregular and wide
4525forms, simply casting an atom to a `@t`. `97` is the ASCII code for
4626`'a'`.
4727
48− /~zod/try=> =cor |= a=@
49− ^- (unit ,@ta)
28+ /~zod/try=> =cor |= a/@
29+ ^- (unit @ta)
5030 [~ u=a]
5131 new var %cor
5232 /~zod/try=> (cor 97)
docs/system/hoon/runes/kt/ktls.md+8−34
@@ -1,52 +1,31 @@
1−`^+ ketlus`
2−===========
1+# `:like`, `^+`, "ketlus", `{$like p/twig q/twig}`
32
43Cast `q` to an unbunted `p`.
54
65Casts `q` to the type of `p`, verifying that it contains
76the type of `q`. Similar to `^+`, but doesn't bunt `p`. Used to
87cast to types that have previously been made into validator
9−functions (clams) with `$,`. For example, the arguments to a [`|=`]() are
10−automatically bunted with a [`=|`](), so `^+` is used. Most often we use `^+` to cast when our type is already defined by something inside our context.
8+functions (clams) with `$,`. For example, the arguments to a `|=` are
9+automatically bunted with a `=|`, so `^+` is used. Most often we use `^+` to cast when our type is already defined by something inside our context.
1110
12−Produces
13−--------
11+Regular form: *2 fixed*
1412
15−Twig: `[%ktls p=twig q=twig]`
16−
17−Sample
18−------
19−
20−`p` is a [`++twig`](). `q` is a twig.
21−
22−Tall form
23−---------
24−
25− ^+ p
26− q
27−
28−Wide form
29−---------
30−
31− ^+(p q)
32−
33−Examples
34−--------
13+Examples:
3514
3615 ~zod/try=> (add 90 7)
3716 97
3817 ~zod/try=> ^+('any text' (add 90 7))
3918 'a'
4019
41−Here we use a ['++cord']() (which could be any cord), `'any text'` to cast our
20+Here we use a '++cord' (which could be any cord), `'any text'` to cast our
4221result to a cord.
4322
44− /~zod/try=> =cor |= a=[q=@ta r=@ s=@]
23+ /~zod/try=> =cor |= a/{q/@ta r/@ s/@}
4524 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
4625 new var %cor
4726 /~zod/try=> (cor 'start' 6 3)
4827 [8.390.876.208.525.960.558 9 3]
49− /~zod/try=> =cor |= a=[q=@ta r=@ s=@]
28+ /~zod/try=> =cor |= a/[q/@ta r/@ s/@]
5029 ^+ a
5130 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
5231 changed %cor
@@ -60,8 +39,3 @@ the sum of the latter two as the second, and the differene as the third.
6039In the first call you can see that our type information is lost, and we
6140produce our cord as an atom. By adding a `^+ a` we cast the result to
6241our input, and type information is retained.
63−
64−Equivalent to
65−-------------
66−
67− ^-(_p q)
docs/system/hoon/runes/kt/ktpm.md+10−39
@@ -1,46 +1,17 @@
1−`^& ketpam`
2−===========
1+# `:zinc`, `^&`, "ketpam", `{$zinc p/twig}`
32
43Convert `%gold` to `%zinc`.
54
6−`^&` is a natural rune that converts a `%gold` core into a `%zinc` core.
7−At present, `%zinc` cores are not commonly used.
5+Converts a `%gold` core `p` into a `%zinc` core.
86
9−See also
10−--------
11−
12−ketbar, `^|`, %ktbr
13−============================
14−
15−Produces
16−--------
17−
18−Twig: `[%ktpm p=twig]`
19−
20−Sample
21−------
22−
23−`p` is a [twig]().
24−
25−Tall form
26−---------
27−
28− ^& p
29−
30−Wide form
31−---------
32−
33− ^&(p)
34−
35−Irregular form
36−--------------
37−
38−None
39−
40−Examples
41−--------
7+Examples:
428
439 ~zod/try=> |=(@ 1)
44− <1.gcq [@ @n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %164>]>
10+ < 1.odf
11+ {@ {our/@p now/@da eny/@uvI} $~ <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>}
12+ >
4513 ~zod/try=> ^&(|=(@ 1))
46− <1&gcq [@ @n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %164>]>
14+ < 1&odf
15+ {@ {our/@p now/@da eny/@uvI} $~ <282.ucw 42.juj 402.arm 110.jyx 1.ztu $151>}
16+ >
17+
docs/system/hoon/runes/kt/ktsg.md+3−22
@@ -1,5 +1,4 @@
1−`^~ ketsig`
2−===========
1+# `:burn`, `^~`, "ketsig", `{$burn p/twig}`
32
43Try executing `p` at compile time.
54
@@ -7,25 +6,7 @@ Tries to execute `p` statically at compile time. If this
76fails, `p` remains dynamic. Primarily useful for
87optimization: when a value is static, `^~` can simplify the compilation.
98
10−Produces
11−--------
12−
13−Twig: `[%ktsg p=twig]`
14−
15−Accepts
16−-------
17−
18−`p` is a [`++twig`]().
19−
20−Tall form
21−---------
22−
23− ^~ a
24−
25−Wide form
26−---------
27−
28− ^~(a)
9+Regular form *1-fixed*
2910
3011Examples
3112--------
@@ -35,7 +16,7 @@ Examples
3516 /~zod/try=> (make '^~(|-(42))')
3617 [%1 p=42]
3718
38−Here we use [`++make`]() to examine the nock generated for a particular
19+Here we use `++make` to examine the nock generated for a particular
3920computation. We start with a simple kicked trap, `|-`, that just
4021generates the static value `42`. When we wrap our `|-` in a `^~` you can
4122see that our compilation is much simpler.
docs/system/hoon/runes/kt/ktts.md+4−31
@@ -1,41 +1,14 @@
1−`^= kettis`
2−===========
1+# `:name`, `^=`, "kettis", `{$name p/toga q/twig}`
32
43Wraps a variable name around a value.
54
6−
75`^=`, `kettis`, `[%ktts p=toga q=twig]` is a natural rune that wraps `q`
8−in the [`++toga`]() `p`. `^=` is most commonly used for assignment,
6+in the `++toga` `p`. `^=` is most commonly used for assignment,
97adding one or more names to values.
108
11−Produces
12−--------
13−
14−Twig: `[%ktts p=toga q=twig]`
15−
16−Accepts
17−-------
18−
19−`p` is a `++toga`. `q` is a [`++twig`]().
20−
21−Tall form
22−---------
23−
24− ^= p
25− q
26−
27−Wide form
28−---------
29−
30− ^=(p q)
31−
32−Irregular form
33−--------------
34−
35− p=q
9+Regular form: *2-fixed*
3610
37−Examples
38−--------
11+Examples:
3912
4013 ~zod/try=> a=1
4114 a=1
docs/system/hoon/runes/kt/ktwt.md+5−28
@@ -1,36 +1,13 @@
1−`^? ketwut`
2−===========
1+# `:lead`, `^?` "ketwut", `{$lead p/twig}`
32
4−Convert `%gold` to `%lead`.
3+Convert core with unreadable sample to have unreadable sample and context.
54
6−Used to convert a [core]() whose context is unreadable (aka
7−a %gold core) to a core both of whose context and sample are
8−unreadable (aka a %lead core). XX
5+Converts a %gold core `p` to a %lead core.
96
7+Regular form: *1-fixed*
108
119
12−Produces
13−--------
14−
15−Twig: `[%ktwt p=twig]`
16−
17−Sample
18−------
19−
20−`p` is a [`++twig`]().
21−
22−Tall form
23−---------
24−
25− ^? p
26−
27−Wide form
28−---------
29−
30− ^?(p)
31−
32−Examples
33−--------
10+Examples:
3411
3512 ~zod/try=> |=(@ 1)
3613 <1.gcq [@ @n <250.yur 41.wda 374.hzt 100.kzl 1.ypj %164>]>
docs/system/hoon/runes/sg/sgbc.md+3−24
@@ -1,33 +1,12 @@
1−`~$ sigbuc`
2−===========
1+# `:poll`, `~$` "sigbuc", `{$poll p/term q/twig}`
32
43Label for profiling.
54
65Labels computation `q` as `p` for profiling.
76
8−Produces
9−--------
7+Irregular form: *2-fixed*
108
11−Twig: `[%sgbc p=term q=twig]`
12−
13−Accepts
14−-------
15−
16−`p` is a [`++term`](). `q` is a [`++twig`]().
17−
18−Tall form
19−---------
20−
21− ~$ p
22− q
23−
24−Wide form
25−---------
26−
27− ~$(p q)
28−
29−Examples
30−--------
9+Examples:
3110
3211 ~zod/try=> (make '~$(foo |-($))')
3312 [%10 p=[p=1.702.259.052 q=[%1 p=7.303.014]] q=[%8 p=[%1 p=[9 2 0 1]] q=[%9 p=2 q=[%0 p=1]]]]
docs/system/hoon/runes/sg/sgbr.md+7−21
@@ -1,28 +1,14 @@
1−`~| sigbar`
2−===========
1+# `:show`, `~|` "sigbar", `{$show p/twig q/twig}`
32
43`p` in stack trace if `q` crashes.
54
6−Presents the product of `p` in the stack trace if `q` crashes. `p` is only
5+Produces: `p` in the stack trace if `q` crashes. `p` is only
76evaluated if `q` crashes.
87
9−Produces
10−--------
8+Regular form: *2-fixed*
119
12−Twig: `[%sgbr p=twig q=twig]`
10+Examples:
1311
14−Accepts
15−-------
16−
17−`p` is a [`++twig`](). `q` is a twig.
18−
19−Tall form
20−---------
21−
22− ~| p
23− q
24−
25−Wide form
26−---------
27−
28− ~|(p q)
12+ > ~|('sample error message' !!)
13+ 'sample error message'
14+ ford: build failed ~[/g/~sivtyv-barnel/use/dojo/~sivtyv-barnel/inn/hand /g/~sivtyv-barnel/use/hood/~sivtyv-barnel/out/dojo/drum/phat/~sivtyv-barnel/dojo /d //term/1]
docs/system/hoon/runes/sg/sgcb.md+4−25
@@ -1,34 +1,13 @@
1−`~_ sigcab`
2−===========
1+# `:lurk`, `~_`, "sigcab", `{$lurk p/twig q/twig}`
32
43Pre-formatted stackframe into stacktrace.
54
65Inserts pre-formatted stackframe `p` into the stacktrace of `q`.
7−In hoon terminology, inserts `p`, a [trap]() producing a [++`tank`]() (pretty printed text), in the trace of `q`.
6+In hoon terminology, inserts `p`, a trap producing a ++`tank` (pretty printed text), in the trace of `q`.
87
9−Produces
10−--------
8+Regular form: *2-fixed*
119
12−Twig: `[%sgcb p=twig q=twig]`
13−
14−Accepts
15−-------
16−
17−`p` is a [`++twig`]() `q` is a twig
18−
19−Tall form
20−---------
21−
22− ~_ p
23− q
24−
25−Wide form
26−---------
27−
28− ~_(p q)
29−
30−Examples
31−--------
10+Examples:
3211
3312 ~zod/try=> (make '~_(+216 ~)')
3413 [%10 p=[p=1.851.876.717 q=[p=[%1 p=[0 216]] q=[%0 p=1]]] q=[%1 p=0]]
docs/system/hoon/runes/sg/sgcn.md+6−34
@@ -1,52 +1,24 @@
1−`~% sigcen`
2−===========
1+# `:fast`, `~%` "sigcen", `{$fast p/chum q/twig r/tyre s/twig}`
32
4−Register jet.
3+General jet hint.
54
65Registers a jet in core `s` so that it can be called when that code is run.
76
8−Produces
9−--------
7+Regularm form: *4-fixed*
108
11−Twig: `[%sgcn p=term q=twig r=tyre s=twig]`
12−
13−Accepts
14−-------
15−
16−`p` is a [`++term`]() `q` is a [`++twig`]() `r` is a [`++tyre`]() `s` is a
17−twig.
18−
19−Tall form
20−---------
21−
22− ~% p
23− q
24− ==
25− p.i.r q.i.r
26− p.i.t.r q.i.t.r
27− ==
28− s
29−
30− ~% p
31− q
32− ~
33− s
34−
35−
36−Examples
37−--------
9+Examples:
3810
3911 ++ aesc :: AES-256
4012 ~% %aesc + ~
4113 |%
4214 ++ en :: ECB enc
4315 ~/ %en
44− |= [a=@I b=@H] ^- @uxH
16+ |= {a/@I b/@H} ^- @uxH
4517 =+ ahem
4618 (be & (ex a) b)
4719 ++ de :: ECB dec
4820 ~/ %de
49− |= [a=@I b=@H] ^- @uxH
21+ |= {a/@I b/@H} ^- @uxH
5022 =+ ahem
5123 (be | (ix (ex a)) b)
5224 --
docs/system/hoon/runes/sg/sgfs.md+5−26
@@ -1,34 +1,13 @@
1−`~/ sigfas`
2−===========
1+# `:funk`, `~/`, "sigfas", `{$funk p/chum q/twig}`
32
4−XX.
3+XX HELP
54
65`~/` is a synthetic rune that implements one common case - a function arm in
7−a [book](), i.e. a library function - of the [`~%`]() [jet]() hint. Assumes the parent axis is `7` and that there are no children.
6+a book, i.e. a library function - of the `~%` jet hint. Assumes the parent axis is `7` and that there are no children.
87
9−Produces
10−--------
8+Regular form: *2fixed*
119
12−Twig: `[%sgfs p=term q=twig]`
13−
14−Accepts
15−-------
16−
17−`p` is a [`++term`](). `q` is a [`++twig`]().
18−
19−Tall form
20−---------
21−
22− ~/ p
23− q
24−
25−Wide form
26−---------
27−
28− ~/(p q)
29−
30−Examples
31−--------
10+Examples:
3211
3312 ~zod/try=> (make '~/ %bam |.(40)')
3413 [%8 p=[%1 p=[1 40]] q=[%10 p=[p=1.953.718.630 q=[%1 p=[7.168.354 [0 7] 0]]] q=[%0 p=1]]]
docs/system/hoon/runes/sg/sggl.md+4−33
@@ -1,43 +1,14 @@
1−`~< siggal`
2−===========
1+# `~<`, "siggal", `{$thin p/$@(term {p/term q/twig}) q/twig}`
32
43Hint to product.
54
6−`~<` is a synthetic rune that applies arbitrary [hint]() `p` to the
5+`~<` is a synthetic rune that applies arbitrary hint `p` to the
76product of `q`. `~<` is similar to `~>`, but computes `q` before
87applying the hint `p`.
98
10−Produces
11−--------
9+Irregular form: *2-fixed*
1210
13−Twig: `[%sggl p=$|(term [p=term q=twig]) q=twig]`
14−
15−Accepts
16−-------
17−
18−`p` is either a [`++term`]() or a `++term` twig pair. `q` is a twig.
19−
20−Tall form
21−---------
22−
23−`p=%foo`:
24−
25− ~< %foo
26− q
27−
28−`p=[p=%foo q=bar]`:
29−
30− ~< %foo.bar
31− q
32−
33−Wide form
34−---------
35−
36− ~<(%foo q)
37− ~<(%foo.bar q)
38−
39−Examples
40−--------
11+Examples:
4112
4213 ~zod/try=> (make '~<(%a 42)')
4314 [%7 p=[%1 p=42] q=[%10 p=97 q=[%0 p=1]]]
docs/system/hoon/runes/sg/sggr.md+4−33
@@ -1,41 +1,12 @@
1−`~> siggar`
2−===========
1+# `:hint`, `~>` "siggar", {$hint p/$@(term {p/term q/twig}) q/twig}
32
43Arbitrary hint
54
6−`~>` is a natural rune that applies arbitrary hint `p` to `q`.
5+Applies arbitrary hint `p` to `q`.
76
8−Produces
9−--------
7+Regular form: *2-fixed*
108
11−Twig: `[%sggr p=$|(term [p=term q=twig]) q=twig]`
12−
13−Accepts
14−-------
15−
16−`p` is either a [`++term`]() or a term [`++twig`] pair. `q` is a twig.
17−
18−Tall form
19−---------
20−
21−`p=%foo`:
22−
23− ~> %foo
24− q
25−
26−`p=[p=%foo q=bar]`:
27−
28− ~> %foo.bar
29− q
30−
31−Wide form
32−---------
33−
34− ~>(%foo q)
35− ~>(%foo.bar q)
36−
37−Examples
38−--------
9+Examples:
3910
4011 ~zod/try=> (make '~>(%a 42)')
4112 [%10 p=97 q=[%1 p=42]]
docs/system/hoon/runes/sg/sgls.md+4−24
@@ -1,32 +1,12 @@
1−`~+ siglus`
2−===========
1+# `:memo`, `~+`, "siglus", `{$memo p/@ q/twig}`
32
43Memoize computation.
54
65Hints to the interpreter to memoize (cache) the computation of `p`.
76
8−Produces
9−--------
7+Regular form: *1-fixed*
108
11−Twig: `[%sgls p=twig]`
12−
13−Accepts
14−-------
15−
16−`p` is a [`++twig`]()
17−
18−Tall form
19−---------
20−
21− ~+ p
22−
23−Wide form
24−---------
25−
26− ~+(p)
27−
28−Examples
29−--------
9+Examples:
3010
3111 ~zod/try=> 20
3212 20
@@ -40,5 +20,5 @@ Examples
4020 ~zod/try=> `@tas`1.869.440.365
4121 %memo
4222
43−By using [`++make`]() to display the compiled nock, we can see that `~+`
23+By using `++make` to display the compiled nock, we can see that `~+`
4424inserts a `%memo` hint.
docs/system/hoon/runes/sg/sgpm.md+5−50
@@ -1,60 +1,15 @@
1−`~& sigpam`
2−===========
1+# `:dump`, `~&`, "sigpam", `{$dump p/@ud q/twig r/twig}`
32
43Printf.
54
6−'Printf' or 'log' in other languages. Often used for debugging.
5+Prints `q` on the console before computing `r`. `p` is the log priority, 0-3
6+defaulting to 0. `p` is optional and is rarely used.
77
8−More specifically in hoon terminology, prints `q` on the console
9−before computing `r`. `p` is the log priority, 0-3 defaulting to 0. `~&`
10−is similar to `printf` or `log` in other languages, and is very commonly
11−used for debugging.
8+Regular form: *fixed 2 or 3*
129
13−`p` is optional and is rarely used.
1410
15−Produces
16−--------
11+Examples:
1712
18−Twig: `[%sgpm p=@ud q=twig r=twig]`
19−
20−Accepts
21−-------
22−
23−`p` is a [`@ud`]() `q` is a [`++twig`]() `r` is a twig.
24−
25−Tall form
26−---------
27−
28−Priority 0 (debug):
29−
30− ~& q
31− r
32−
33−Priority 1 (notice):
34−
35− ~& > q
36− r
37−
38−Priority 2 (warning):
39−
40− ~& >> q
41− r
42−
43−Priority 3 (alarm):
44−
45− ~& >>> q
46− r
47−
48−Wide form
49−---------
50−
51− ~&(>> q r)
52−
53−Examples
54−--------
55−
56− ~zod/try=> ~
57− ~
5813 ~zod/try=> ~&('oops' ~)
5914 'oops'
6015 ~
docs/system/hoon/runes/sg/sgts.md+3−24
@@ -1,34 +1,13 @@
1−`~= sigtis`
2−===========
1+# `:ddup`, `~=` "sigtis", `{$ddup p/twig q/twig}`
32
43Hint to avoid duplication.
54
65Hints to the interpreter that `q` may produce a noun equal to the
76already existing `p` in order to avoid storing the same noun twice.
87
9−Produces
10−--------
8+Regular form: *2-fixed*
119
12−Twig `[%sgts p=twig q=twig]`
13−
14−Accepts
15−-------
16−
17−`p` is a [`++twig`](). `q` is a twig.
18−
19−Tall form
20−---------
21−
22− ~= p
23− q
24−
25−Wide form
26−---------
27−
28− ~=(p q)
29−
30−Examples
31−--------
10+Examples:
3211
3312 ~zod/try=> 20
3413 20
docs/system/hoon/runes/sg/sgwt.md+4−43
@@ -1,52 +1,13 @@
1−`~? sigwut`
2−===========
1+# `:warn`, `~?`, "sigwut", `{$warn p/@ud q/twig r/twig s/twig}`
32
43PrintF if `q` true.
54
65Same as `~&` except for that `r` is printed to the console if and only
7−if `q` evaluates to true.
6+if `q` evaluates to true. `p` is the priority level between 1-3 (defaults to 0) and is both optional and rarely used.
87
9−Produces
10−--------
8+Regularm form *4-fixed*
119
12−Twig: `[%sgwt p=@ud q=twig r=twig s=twig]`
13−
14−Accepts
15−-------
16−
17−`p` is a [`@ud`](). `q` is a [`++twig`](). `r` is a twig. `s` is a
18−twig.
19−
20−Tall form
21−---------
22−
23−Priority 0 (debug):
24−
25− ~& q
26− r
27−
28−Priority 1 (notice):
29−
30− ~& > q
31− r
32−
33−Priority 2 (warning):
34−
35− ~& >> q
36− r
37−
38−Priority 3 (alarm):
39−
40− ~& >>> q
41− r
42−
43−Wide form
44−---------
45−
46− ~&(>> q r)
47−
48−Examples
49−--------
10+Examples:
5011
5112 ~zod/try=> ~?((gth 1 2) 'oops' ~)
5213 ~
docs/system/hoon/runes/sg/sgzp.md+4−34
@@ -1,40 +1,10 @@
1−`~! sigzap`
2−===========
1+# `:peep`, `~!`, "sigzap", `{$peep p/twig q/twig}`
32
43Print type on compilation fail.
54
6−`~!` is a natural rune for debugging uses only, semantically equivalent
7−to [`++twig`] `q`. If compilation fails within `q`, `~!` will show the
8−type of `p` on the stacktrace.
5+Produces the type of `p` on the stacktrace if `q` fails. Used only for debugging purposes.
96
10−Produces
11−--------
12−
13−Twig: `[%sgzp p=twig q=twig]`
14−
15−Sample
16−------
17−
18−`p` is a twig, `q` is a twig.
19−
20−Tall form
21−---------
22−
23− ~! p
24− q
25−
26−Wide form
27−---------
28−
29− ~!(p q)
30−
31−Irregular form
32−--------------
33−
34−None
35−
36−Examples
37−--------
7+Examples:
388
399 ~zod/try=> a
4010 ! -find-limb.a
@@ -55,5 +25,5 @@ of `'foo'`, `@t`.
5525 ! find-none
5626 ! exit
5727
58−Again, we use our unassigned variable `a` and the [cube]() `%foo`, whose
28+Again, we use our unassigned variable `a` and the cube `%foo`, whose
5929type is in fact `%foo`.
docs/system/hoon/runes/sm/smcl.md+6−38
@@ -1,48 +1,16 @@
1−`;: semcol`
2−====
1+# ``, `;:`, "semcol" `{$wad p/twig q/(list twig)}`
32
43Fold over tuple.
54
65Apply a binary function `p` to a tuple `q` with n elements. Similar to folding over the tuple `q`.
76
8−Syntax
9−======
7+Regular form: *running*
108
11−`;:` is a synthetic rune that applies `p`, a binary gate, to the n-ary
12−tuple `q`. `;:` is similar to folding over the tuple `q`, producing the
13−final result.
9+Irregular form:
1410
15−Produces
16−--------
11+`:(p i.q i.t.q i.t.t.q) ;:(p i.q i.t.q i.t.t.q)`
1712
18−Twig: `[%smcl p=twig q=tusk]`
19−
20−Accepts
21−-------
22−
23−`p` is a [`++twig`](). `q` is a [`++tusk`](), a list of twigs.
24−
25−Tall form
26−---------
27−
28− ;: p
29− i.q
30− i.t.q
31− i.t.t.q
32− ==
33−
34−Wide form
35−---------
36−
37− ;:(p i.q i.t.q i.t.t.q)
38−
39−Irregular form
40−--------------
41−
42− :(p i.q i.t.q i.t.t.q)
43−
44−Examples
45−--------
13+Examples:
4614
4715 ~zod/try=> (add 3 (add 4 5))
4816 12
@@ -61,5 +29,5 @@ gate `++add`.
6129 ~zod/try=> `tape`(weld "foo" (weld "bar" "baz"))
6230 "foobarbaz"
6331
64−Following on from our previous example, using `;:` with [`++weld`]() is
32+Following on from our previous example, using `;:` with `++weld` is
6533convenient for concatenating multiple strings.
docs/system/hoon/runes/sm/smcn.mddeleted−82
@@ -1,82 +0,0 @@
1−`;% semcen`
2−====
3−
4−`%-` in `++sail`.
5−
6−Performs the same function as `%-`, except within XML template syntax
7−(aka sail). Passes `q`, a list of n arguments, to function `p`.
8−
9−Produces
10−--------
11−
12−Twig: [`++marl`]()
13−
14−Accepts
15−-------
16−
17−`p` is a [`++twig`]().
18−
19−Tall form
20−---------
21−
22− ;% p
23−
24−Wide form
25−---------
26−
27− %{p}
28−
29−(within quoted form)
30−
31−Examples
32−--------
33−
34− ~zod/try=>
35− ;div:"%{|=(a=marl (weld a a))} repeat"
36− [ [%div ~]
37− ~[
38− [g=[n=%$ a=~[[n=%$ v=" repeat"]]] c=~]
39− [g=[n=%$ a=~[[n=%$ v=" repeat"]]] c=~]
40− ]
41− ]
42− ~zod/try=>
43− (poxo ;div:"%{|=(a=marl (weld a a))} repeat")
44− "<div> repeat repeat</div>"
45−
46−In this simple example we use a function, `|=(a=marl (weld a a))` that
47−produces a `++marl` twice. Using the irregular form of `;%` we produce a
48−repeated child node `'repeat'`. [`++poxo`]() prints our result in XML.
49−
50− ~zod/try=>
51− ;=
52− ;% |=(a=marl (turn a |=(b=manx ;script(src (poxo b));)))
53− ; /gep/hart.js
54− ; /main/lib/urb.js
55− ; //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js
56− ==
57− ~[
58− [[%script [%src "/gep/hart.js
59− "] ~] ~]
60− [[%script [%src "/main/lib/urb.js
61− "] ~] ~]
62− [ [ %script
63− [%src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js
64− "]
65− ~
66− ]
67− ~
68− ]
69− ]
70− ~zod/try=>
71− %- many:poxo :_ ~
72− ;=
73− ;% |=(a=marl (turn a |=(b=manx ;script(src (poxo b));)))
74− ; /gep/hart.js
75− ; /main/lib/urb.js
76− ; //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js
77− ==
78− "<script src="/gep/hart.js"></script><script src="/main/lib/urb.js"></script><script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js"></script>"
79−
80−Here we go through a similar example, passing a list of urls for a
81−script tag to a gate that produces a `<script>` tag. Since we produce
82−multiple tags, we use `many:poxo` to print our result as XML.
docs/system/hoon/runes/sm/smdq.mddeleted−46
@@ -1,46 +0,0 @@
1−`;" semdoq`
2−====
3−
4−Make string.
5−
6−`semdoq` is a synthetic rune used to make strings, interpreted or not.
7−
8−Produces
9−--------
10−
11−Twig: `[%smdq p=(list beer)]`
12−
13−Sample
14−------
15−
16−`p` is a [`++list`]() of [`++beer`]()s.
17−
18−Irregular form
19−--------------
20−
21− "foo"
22−
23−Examples
24−--------
25−
26− ~zod/try=> "foo"
27− "foo"
28− ~zod/try=> "bar"
29− "bar"
30−
31−Here we see our most common case of `semdoq`, producing strings ([`++tape`]()s).
32−
33− ~zod/try=> "ba{<+(2)>}r"
34− "ba3r"
35−
36−In this case we include some simple string interpolation using `{` and
37−`}`.
38−
39− ~zod/try=> (ream '"foo"')
40− [%smdq p=~[102 111 111]]
41− ~zod/try=> (ream '"ba{<+(2)>}r"')
42− [ %smdq
43− p=~[98 97 [~ p=[%cltr p=~[[%hxgl p=~[[%dtls p=[%dtzy p=%ud q=2]]]]]]] 114]
44− ]
45−
46−Using [`++ream`]() we can see how our previous expressions are parsed.
docs/system/hoon/runes/sm/smhp.mddeleted−45
@@ -1,45 +0,0 @@
1−`;- semhep`
2−====
3−
4−Interpolate string.
5−
6−Interpolates a string (aka [++tape]()) into a [`++marl`](), our datastructure for XML.
7−
8−Produces
9−--------
10−
11−Twig: tape
12−
13−Sample
14−------
15−
16−`p` is a [`++twig`]().
17−
18−Tall form
19−---------
20−
21− ;- a
22−
23−Wide form
24−---------
25−
26− -{a}
27−
28−(within quoted form)
29−
30−Examples
31−--------
32−
33− ~zod/try=>
34− =+ c="contents!"
35− ;div: -{c}
36− [[%div ~] [[%~. [%~. "contents!"] ~] ~] ~]
37− ~zod/try=>
38− %- poxo
39− =+ c="contents!"
40− ;div: -{c}
41− "<div>contents!</div>"
42−
43−Here we add `c` to our context as a `++tape`, and interpolate it within
44−our `;div` using the irregular form of `;-`. By using [`++poxo`]() we
45−can see our result in XML form.
docs/system/hoon/runes/sm/smls.mddeleted−48
@@ -1,48 +0,0 @@
1−`;+ semlus`
2−====
3−
4−Interpolate `++manx`.
5−
6−`;+` is a virtual rune used within [`++sail`]() to interpolate a manx.
7−`;+` is useful when you need to dynamically produce a tag in a `++sail`
8−block.
9−
10−Produces
11−--------
12−
13−Twig: [`++manx`]()
14−
15−Sample
16−------
17−
18−`p` is a twig
19−
20−Tall form
21−---------
22−
23− ;+ a
24−
25−Wide form
26−---------
27−
28− +{a}
29−
30−(within quoted form)
31−
32−Examples
33−--------
34−
35− ~zod/try=>
36− =+ tag=;p(class "doc")
37− ;div ;+ tag
38− ==
39− [[%div ~] [[%p [%class "doc"] ~] ~] ~]
40− ~zod/try=>
41− %- poxo
42− =+ tag=;p(class "doc")
43− ;div ;+ tag
44− ==
45− "<div><p class="doc"></p></div>"
46−
47−Here we add `tag` to our context as a `;p` tag and use `;+` to add it to
48−our `;div`. Using [`++poxo`]() we can print our result as XML.
docs/system/hoon/runes/sm/smsg.md+4−28
@@ -1,36 +1,12 @@
1−`;~ semsig`
2−====
1+# `:dip`, `;~`, "semsig" `{$dip p/twig q/(list twig)}`
32
43Monad composer.
54
6−`;~` is a synthetic rune used to compose functions under a monad.
5+Composes a list of functions `p` and `q` under a monad. `q` can be 1 or more functions.
76
8−Produces
9−--------
7+Regular form: 1-fixed, `q` is *running*
108
11−Twig: `[%smsg p=(list beer)]`
12−
13−Accepts
14−-------
15−
16−`p` is a [`++list`]() of [`++beer`]().
17−
18−Tall form
19−---------
20−
21− ;~ p
22− i.q
23− i.t.q
24− i.t.t.q
25− ==
26−
27−Wide form
28−---------
29−
30− ;~(p i.q i.t.q i.t.t.q)
31−
32−Examples
33−--------
9+Examples:
3410
3511 ~zod/try=> =cmp |=([a=tape b=$+(char tape)] `tape`?~(a ~ (weld (b i.a) t.a)))
3612 ~zod/try=> ;~(cmp trip)
docs/system/hoon/runes/sm/smsm.md+4−33
@@ -1,40 +1,11 @@
1−`;; semsem`
2−====
1+# `:fry`, `;;`, "semsem" `{$fry p/twig q/twig}`
32
43Fixpoint.
54
6−`;;` is a synthetic rune that types `q` as a fixpoint of `p`. More
7−specifically, `;;` slams `q` through gate `p`, asserting that the
8−resulting noun [`.=`]() the original, and produces it.
5+Slams `q` through gate `p`, asserting that the
6+resulting noun is equal to `.=` the original, and produces it.
97
10−See also
11−--------
12−
13−[`++hard`]()
14−
15−Produces
16−--------
17−
18−Twig: `[%smsm p=twig q=twig]`
19−
20−Accepts
21−-------
22−
23−`p` is a [`++twig`](). `q` is a twig.
24−
25−Tall form
26−---------
27−
28− ;; p
29− q
30−
31−Wide form
32−---------
33−
34− ;;(p q)
35−
36−Examples
37−--------
8+Examples: XX Review closely
389
3910 ~zod/try=> ^-(tape ~[97 98 99])
4011 ! type-fail
docs/system/hoon/runes/sm/smtr.mddeleted−50

This diff is too big to show here.

docs/system/hoon/runes/sm/smzz.mddeleted−79

This diff is too big to show here.

docs/system/hoon/runes/ts/.tsbr.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/ts/.tscl.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/ts/.tsdt.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/ts/.tsgl.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/ts/.tsgr.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/ts/.tshp.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/ts/.tskt.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/ts/.tsls.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/ts/.tssg.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/ts/.tstr.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/ts/tsbr.md+6−7

This diff is too big to show here.

docs/system/hoon/runes/ts/tscl.md+4−29

This diff is too big to show here.

docs/system/hoon/runes/ts/tsdt.md+2−35

This diff is too big to show here.

docs/system/hoon/runes/ts/tsgl.md+7−37

This diff is too big to show here.

docs/system/hoon/runes/ts/tsgr.md+7−28

This diff is too big to show here.

docs/system/hoon/runes/ts/tshp.md+6−32

This diff is too big to show here.

docs/system/hoon/runes/ts/tskt.md+7−44

This diff is too big to show here.

docs/system/hoon/runes/ts/tsls.md+5−33

This diff is too big to show here.

docs/system/hoon/runes/ts/tssg.md+3−34

This diff is too big to show here.

docs/system/hoon/runes/ts/tstr.md+3−29

This diff is too big to show here.

docs/system/hoon/runes/wt/wtbr.md+5−29

This diff is too big to show here.

docs/system/hoon/runes/wt/wtcl.md+5−25

This diff is too big to show here.

docs/system/hoon/runes/wt/wtdt.md+11−32

This diff is too big to show here.

docs/system/hoon/runes/wt/wtgl.md+3−28

This diff is too big to show here.

docs/system/hoon/runes/wt/wtgr.md+4−30

This diff is too big to show here.

docs/system/hoon/runes/wt/wthp.md+10−43

This diff is too big to show here.

docs/system/hoon/runes/wt/wtkt.md+7−30

This diff is too big to show here.

docs/system/hoon/runes/wt/wtls.md+10−55

This diff is too big to show here.

docs/system/hoon/runes/wt/wtpm.md+6−30

This diff is too big to show here.

docs/system/hoon/runes/wt/wtpt.md+2−32

This diff is too big to show here.

docs/system/hoon/runes/wt/wtsg.md+3−28

This diff is too big to show here.

docs/system/hoon/runes/wt/wtts.md+5−25

This diff is too big to show here.

docs/system/hoon/runes/wt/wtzp.md+3−28

This diff is too big to show here.

docs/system/hoon/runes/zp/.zpcb.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/zp/.zpcm.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/zp/.zpfs.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/zp/.zpgr.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/zp/.zpsm.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/zp/.zpts.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/zp/.zpwt.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/zp/.zpzp.md.swpnew file

Binary file not shown.

docs/system/hoon/runes/zp/zpcb.mddeleted−57

This diff is too big to show here.

docs/system/hoon/runes/zp/zpcm.md+2−22

This diff is too big to show here.

docs/system/hoon/runes/zp/zpfs.mddeleted−59

This diff is too big to show here.

docs/system/hoon/runes/zp/zpgr.md+4−26

This diff is too big to show here.

docs/system/hoon/runes/zp/zpsm.md+3−24

This diff is too big to show here.

docs/system/hoon/runes/zp/zpts.md+4−24

This diff is too big to show here.

docs/system/hoon/runes/zp/zpwt.md+4−27

This diff is too big to show here.

docs/system/hoon/runes/zp/zpzp.md+6−25

This diff is too big to show here.