@@ -5,6 +5,21 @@ section 3bD, JSON and XML
6Mime type to `++cord`
6Mime type to `++cord`
8+Renders a [mime](http://en.wikipedia.org/wiki/MIME) type path with infix
13+`myn` is a ++[`mite`](), a [`++list`]() of [`@ta`]().
8 ++ moon :: mime type to text
23 ++ moon :: mime type to text
9 |= myn=mite
24 |= myn=mite
@@ -15,10 +30,8 @@ Mime type to `++cord`
15 (weld (trip i.myn) `tape`['/' $(myn t.myn)])
30 (weld (trip i.myn) `tape`['/' $(myn t.myn)])
18−Renders a [mime](http://en.wikipedia.org/wiki/MIME) type path with infix
33+Examples
19−`/` to a [cord]().
34+--------
21−`myn` is a ++[mite](), a list of [@ta]().
23 ~zod/try=> `@t`(moon /image/png)
36 ~zod/try=> `@t`(moon /image/png)
24 'image/png'
37 'image/png'
@@ -31,29 +44,43 @@ Renders a [mime](http://en.wikipedia.org/wiki/MIME) type path with infix
32Parse cube with fork
45Parse cube with fork
34− ++ perk :: parse cube with fork
38− (cold -.a (jest -.a))
43Parser generator. Produces a parser that succeeds upon encountering one
47Parser generator. Produces a parser that succeeds upon encountering one
44of the [`++term`]()s in a faceless list `a`.
48of the [`++term`]()s in a faceless list `a`.
46−A- perk is an arm used to parse one of a finite set of options, formally
50+A perk is an arm used to parse one of a finite set of options, formally
47−a choice between terms: if you want to match "true" or "false", and
51+a choice between [`++term`]()s: if you want to match "true" or "false", and
48nothing else, (perk \~[%true %false]) produces the relevant parser,
52nothing else, (perk \~[%true %false]) produces the relevant parser,
49whose result type is `?(%true %false)`. For more complicated
53whose result type is `?(%true %false)`. For more complicated
50−transformations, a combintation of ++sear and map ++get is recommended,
54+transformations, a combintation of ++[`++sear`]() and map ++[`++get`]() is recommended,
51e.g. `(sear ~(get by (mo ~[[%true &] [%false |]]))) sym)` will have a
55e.g. `(sear ~(get by (mo ~[[%true &] [%false |]]))) sym)` will have a
52−similar effect but produce `?(& |)` ,a loobean. However, constructions
56+similar effect but produce `?(& |)` , a [boolean](). However, constructions
53such as `(sear (flit ~(has in (sa %true %false %other ~))) sym)` are
57such as `(sear (flit ~(has in (sa %true %false %other ~))) sym)` are
54needlessly unwieldy.
58needlessly unwieldy.
56−`a` is a [`++pole`](), which is a [`++list`]() without [`%face`]()s
63+`a` is a [`++pole`](), which is a [`++list`]() without [`%face`]()s.
73+ ++ perk :: parse cube with fork
77+ (cold -.a (jest -.a))
58 ~zod/try=> (scan "ham" (perk %sam %ham %lam ~))
85 ~zod/try=> (scan "ham" (perk %sam %ham %lam ~))
@@ -65,14 +92,29 @@ needlessly unwieldy.
66JSON parser core
93JSON parser core
95+JSON parser core: parses a [`++cord`]() `a` to the hoon structure for JSON,
68 ++ poja :: JSON parser core
112 ++ poja :: JSON parser core
69 =< |=(a=cord (rush a apex))
113 =< |=(a=cord (rush a apex))
72−JSON parser core: parses a `++cord` `a` to the hoon structure for JSON,
116+Examples
73−a [`++json`]().
117+--------
77 ~zod/try=> (poja '[1,2,3]')
119 ~zod/try=> (poja '[1,2,3]')
78 [~ [%a p=~[[%n p=~.1] [%n p=~.2] [%n p=~.3]]]]
120 [~ [%a p=~[[%n p=~.1] [%n p=~.2] [%n p=~.3]]]]
@@ -81,19 +123,30 @@ a [`++json`]().
81 ~zod/try=> (poja 'invalid{json')
123 ~zod/try=> (poja 'invalid{json')
84−### `++apex`
126+### `++tops`
86Parse object
128Parse object
88− ++ apex ;~(pose abox obox) :: JSON object
90−Top level parsing rule. Parses either a single JSON object, or an array
130+Top level parsing [`++rule`](). Parses either a single JSON object, or an array
91of JSON objects to a [`++json`](). See also: [`++abox`](), [`++obox`]().
131of JSON objects to a [`++json`](). See also: [`++abox`](), [`++obox`]().
93−A- this is now called ++tops, and ++apex is the old ++valu, which
133+Accepts
94−apparently didn't make its way into the docs. Apologies for the
134+-------
95−confusion, many things have been restructured in ++shell inconsistently
135+
96−with current test:urbit.git
136+A [`++nail`]().
146+ ++ apex ;~(pose abox obox) :: JSON object
98 ~zod/try=> (rash '[1,2]' apex:poja)
151 ~zod/try=> (rash '[1,2]' apex:poja)
99 [%a p=~[[%n p=~.1] [%n p=~.2]]]
152 [%a p=~[[%n p=~.1] [%n p=~.2]]]
@@ -103,10 +156,25 @@ with current test:urbit.git
106−### `++valu`
159+### `++apex`
108Parse value
161Parse value
163+Parsing [`++rule`](). Parses JSON values to [`++json`]().
110 ++ valu :: JSON value
178 ++ valu :: JSON value
111 %+ knee *json |. ~+
179 %+ knee *json |. ~+
112 ;~ pfix spac
180 ;~ pfix spac
@@ -120,7 +188,8 @@ Parse value
123−Parsing rule. Parses JSON values to [`++json`]().
191+Examples
125 ~zod/try=> (rash '[1,2]' valu:poja)
194 ~zod/try=> (rash '[1,2]' valu:poja)
126 [%a p=~[[%n p=~.1] [%n p=~.2]]]
195 [%a p=~[[%n p=~.1] [%n p=~.2]]]
@@ -139,11 +208,27 @@ Parsing rule. Parses JSON values to [`++json`]().
140Parse array
209Parse array
142− ++ abox (stag %a (ifix [sel (ws ser)] (more (ws com) valu)))
144Parsing rule. Parses a JSON array with values enclosed within `[]` and
211Parsing rule. Parses a JSON array with values enclosed within `[]` and
145delimited by a `,`.
212delimited by a `,`.
227+ ++ abox (stag %a (ifix [sel (ws ser)] (more (ws com) valu)))
147 ~zod/try=> (rash '[1, 2,4]' abox:poja)
232 ~zod/try=> (rash '[1, 2,4]' abox:poja)
148 [[%n p=~.1] ~[[%n p=~.2] [%n p=~.4]]]
233 [[%n p=~.1] ~[[%n p=~.2] [%n p=~.4]]]
@@ -154,11 +239,27 @@ JSON Objects
155Parse key value pair
240Parse key value pair
157− ++ pair ;~(plug ;~(sfix (ws stri) (ws col)) valu)
159Parsing rule. Parses a [`++json`]() from a JSON key-value pair of a
242Parsing rule. Parses a [`++json`]() from a JSON key-value pair of a
160string and value delimited by `:`.
243string and value delimited by `:`.
258+ ++ pair ;~(plug ;~(sfix (ws stri) (ws col)) valu)
162 ~zod/try=> (rash '"ham": 2' pair:poja)
263 ~zod/try=> (rash '"ham": 2' pair:poja)
163 ['ham' [%n p=~.2]]
264 ['ham' [%n p=~.2]]
@@ -166,11 +267,27 @@ string and value delimited by `:`.
167Parse array of objects
268Parse array of objects
169− ++ obje (ifix [(ws kel) (ws ker)] (more (ws com) pair))
171Parsing rule. Parses a [`++json`]() from an array of JSON object
270Parsing rule. Parses a [`++json`]() from an array of JSON object
172key-value pairs that are enclosed within `{}` and separated by `,`.
271key-value pairs that are enclosed within `{}` and separated by `,`.
281+A `(like ,[%o p=(map ,@t json)])`
286+ ++ obje (ifix [(ws kel) (ws ker)] (more (ws com) pair))
174 ~zod/try=> (rash '{"ham": 2, "lam":true}' obje:poja)
291 ~zod/try=> (rash '{"ham": 2, "lam":true}' obje:poja)
175 [['ham' [%n p=~.2]] ~[['lam' [%b p=%.y]]]]
292 [['ham' [%n p=~.2]] ~[['lam' [%b p=%.y]]]]
@@ -178,10 +295,25 @@ key-value pairs that are enclosed within `{}` and separated by `,`.
179Parse boxed object
296Parse boxed object
298+Parsing rule. Parses an array of JSON objects to an object of [`++json`](). See also: [`++json`]().
308+A `(like ,[%o p=(map ,@t json)])`
181 ++ obox (stag %o (cook mo obje))
313 ++ obox (stag %o (cook mo obje))
183−Parsing rule. Parses an array of JSON objects to a [`++json`]() map with
315+Examples
184−a tag of `%o`. See also: [`++json`]().
316+--------
186 ~zod/try=> (rash '{"ham": 2, "lam":true}' obox:poja)
318 ~zod/try=> (rash '{"ham": 2, "lam":true}' obox:poja)
187 [%o {[p='lam' q=[%b p=%.y]] [p='ham' q=[%n p=~.2]]}]
319 [%o {[p='lam' q=[%b p=%.y]] [p='ham' q=[%n p=~.2]]}]
@@ -193,11 +325,29 @@ JSON Booleans
194Parse boolean
326Parse boolean
196− ++ bool ;~(pose (cold & (jest 'true')) (cold | (jest 'false')))
198Parsing rule. Parses a string of either `true` or `false` to a
328Parsing rule. Parses a string of either `true` or `false` to a
199[`++json`]() boolean.
329[`++json`]() boolean.
346+ ++ bool ;~(pose (cold & (jest 'true')) (cold | (jest 'false')))
201 ~zod/try=> (rash 'true' bool:poja)
351 ~zod/try=> (rash 'true' bool:poja)
203 ~zod/try=> (rash 'false' bool:poja)
353 ~zod/try=> (rash 'false' bool:poja)
@@ -213,13 +363,29 @@ JSON strings
214Parse string
364Parse string
217− (cook crip (ifix [doq doq] (star jcha)))
219Parsing rule. Parse a string to a [`++cord`](). A JSON string is a list
366Parsing rule. Parse a string to a [`++cord`](). A JSON string is a list
220of characters enclosed in double quotes along with escaping `\`s, to a
367of characters enclosed in double quotes along with escaping `\`s, to a
221[`++cord`](). See also [`++jcha`]().
368[`++cord`](). See also [`++jcha`]().
378+A `(like ,[%s p=@t])`.
384+ (cook crip (ifix [doq doq] (star jcha)))
223 ~zod/try=> (rash '"ham"' stri:poja)
389 ~zod/try=> (rash '"ham"' stri:poja)
225 ~zod/try=> (rash '"h\\nam"' stri:poja)
391 ~zod/try=> (rash '"h\\nam"' stri:poja)
@@ -232,11 +398,28 @@ of characters enclosed in double quotes along with escaping `\`s, to a
233Parse char from string
399Parse char from string
235− ++ jcha ;~(pose ;~(less doq bas prn) esca) :: character in string
237Parsing rule. Parses either a literal or escaped character from a JSON
401Parsing rule. Parses either a literal or escaped character from a JSON
238string to a [`++cord`]().
402string to a [`++cord`]().
418+ ++ jcha ;~(pose ;~(less doq bas prn) esca) :: character in string
240 ~zod/try=> (rash 'a' jcha:poja)
423 ~zod/try=> (rash 'a' jcha:poja)
242 ~zod/try=> (rash '!' jcha:poja)
425 ~zod/try=> (rash '!' jcha:poja)
@@ -253,6 +436,23 @@ string to a [`++cord`]().
254Parse escaped char
437Parse escaped char
439+Parsing rule. Parses a backslash-escaped special character, low ASCII,
440+or UTF16 codepoint, to a [`++cord`]().
256 ++ esca :: Escaped character
456 ++ esca :: Escaped character
257 ;~ pfix bas
457 ;~ pfix bas
@@ -261,8 +461,8 @@ Parse escaped char
261 ;~(pfix (just 'u') (cook tuft qix:ab)) :: 4-digit hex to UTF-8
461 ;~(pfix (just 'u') (cook tuft qix:ab)) :: 4-digit hex to UTF-8
264−Parsing rule. Parses a backslash-escaped special character, low ASCII,
464+Examples
265−or UTF16 codepoint, to a [`++cord`]().
465+--------
267 ~zod/try=> (rash 'b' esca:poja)
467 ~zod/try=> (rash 'b' esca:poja)
@@ -282,7 +482,7 @@ or UTF16 codepoint, to a [`++cord`]().
282JSON numbers
482JSON numbers
283------------
483------------
285−A- JSON numbers are stored as cords internally in lieu of full float
485+A JSON numbers are stored as cords internally in lieu of full float
286support, so ++numb and subarms are really more *validators* than parsers
486support, so ++numb and subarms are really more *validators* than parsers
@@ -290,6 +490,22 @@ per se.
291Parse number
491Parse number
493+Parsing rule. Parses decimal numbers with an optional `-`, fractional
494+part, or exponent part, to a [`++tape`]().
504+An [`++edge`]() of a [`++tape`]().
294 ;~ (comp twel)
510 ;~ (comp twel)
295 (mayb (piec hep))
511 (mayb (piec hep))
@@ -301,8 +517,8 @@ Parse number
301 (mayb expo)
517 (mayb expo)
304−Parsing rule. Parses decimal numbers with an optional `-`, fractional
520+Examples
305−part, or exponent part, to a [`++cord`]().
521+--------
307 ~zod/try=> (rash '0' numb:poja)
523 ~zod/try=> (rash '0' numb:poja)
@@ -322,9 +538,25 @@ part, or exponent part, to a [`++cord`]().
541+Parsing rule. Parses digits `0` through `9` to a [`++tape`]().
551+The [`++edge`]() of a `++tape`.
325 ++ digs (star (shim '0' '9'))
556 ++ digs (star (shim '0' '9'))
327−Parsing rule. Parses digits `0` through `9` to a [`++tape`]().
558+Examples
329 ~zod/try=> (rash '' digs:poja)
561 ~zod/try=> (rash '' digs:poja)
@@ -339,6 +571,22 @@ Parsing rule. Parses digits `0` through `9` to a [`++tape`]().
340Parse exponent part
572Parse exponent part
574+Parsing rule. Parses an exponent to a [`++tape`]() .An exponent is an
575+`e` or 'E', followed by an optional `+` or `-`, and then by digits.
585+The [`++edge`]() of a `++tape`.
342 ++ expo :: Exponent part
590 ++ expo :: Exponent part
343 ;~ (comp twel)
591 ;~ (comp twel)
344 (piec (mask "eE"))
592 (piec (mask "eE"))
@@ -346,8 +594,8 @@ Parse exponent part
349−Parsing rule. Parses an exponent to a [`++cord`](). An exponent is an
597+Examples
350−`e`, followed by an optional `+` or `-`, followed by digits.
598+--------
352 ~zod/try=> `tape`(rash 'e7' expo:poja)
600 ~zod/try=> `tape`(rash 'e7' expo:poja)
@@ -360,9 +608,25 @@ Parsing rule. Parses an exponent to a [`++cord`](). An exponent is an
361Fractional part
609Fractional part
611+Parsing rule. Parses a dot followed by digits to a [`++cord`]().
621+The [`++edge`]() of a `++tape`.
363 ++ frac ;~(plug dot digs) :: Fractional part
626 ++ frac ;~(plug dot digs) :: Fractional part
365−Parsing rule. Parses a dot followed by digits to a [`++cord`]().
628+Examples
367 ~zod/try=> (rash '.25' frac:poja)
631 ~zod/try=> (rash '.25' frac:poja)
368 [~~~. "25"]
632 [~~~. "25"]
@@ -378,9 +642,25 @@ whitespace
379Parse whitespace
643Parse whitespace
645+Parsing rule. Parses a whitespace to a [`++tape`]().
381 ++ spac (star (mask [`@`9 `@`10 `@`13 ' ' ~]))
660 ++ spac (star (mask [`@`9 `@`10 `@`13 ' ' ~]))
383−Parsing rule. Parses a whitespace to a [`++tape`]().
662+Examples
385 ~zod/try=> (scan "" spac:poja)
665 ~zod/try=> (scan "" spac:poja)
@@ -396,13 +676,27 @@ Parsing rule. Parses a whitespace to a [`++tape`]().
397Allow prefix whitespace
677Allow prefix whitespace
399− ++ ws |*(sef=_rule ;~(pfix spac sef))
401Parser modifier. Produces a rule that allows for a whitespace before
679Parser modifier. Produces a rule that allows for a whitespace before
402applying `sef`.
680applying `sef`.
404`sef` is a [`++rule`]().
685`sef` is a [`++rule`]().
695+ ++ ws |*(sef=_rule ;~(pfix spac sef))
406 ~zod/try=> (rash ' 4' digs:poja)
700 ~zod/try=> (rash ' 4' digs:poja)
@@ -421,9 +715,25 @@ Plumbing
422Maybe parse
716Maybe parse
718+Parser modifier. Need to document, an example showing failure.
424 ++ mayb |*(bus=_rule ;~(pose bus (easy "")))
733 ++ mayb |*(bus=_rule ;~(pose bus (easy "")))
426−Parser modifier. Need to document, an example showing failure.
735+Examples
428 ~zod/try=> (abox:poja 1^1 "not-an-array")
738 ~zod/try=> (abox:poja 1^1 "not-an-array")
429 [p=[p=1 q=1] q=~]
739 [p=[p=1 q=1] q=~]
@@ -434,14 +744,28 @@ Parser modifier. Need to document, an example showing failure.
435Weld two tapes
745Weld two tapes
437− ++ twel |=([a=tape b=tape] (weld a b))
747+Concatenates two tapes, `a` and `b`, producing a [`++tape`]().
439−Concatenates two tapes, `a` and `b`, producing a `++tape`.
749+Accepts
441`a` is a [`++tape`]().
752`a` is a [`++tape`]().
443`b` is a [`++tape`]().
754`b` is a [`++tape`]().
759+The [`++edge`]() of a `++tape`.
764+ ++ twel |=([a=tape b=tape] (weld a b))
445 ~zod/try=> (twel "sam" "hok"):poja
769 ~zod/try=> (twel "sam" "hok"):poja
446 ~[~~s ~~a ~~m ~~h ~~o ~~k]
770 ~[~~s ~~a ~~m ~~h ~~o ~~k]
447 ~zod/try=> (twel "kre" ""):poja
771 ~zod/try=> (twel "kre" ""):poja
@@ -451,23 +775,52 @@ Concatenates two tapes, `a` and `b`, producing a `++tape`.
452Parse char to list
776Parse char to list
778+Parser modifer. Parses an atom with `bus` and then wraps it in a
784+`bus` is a [`++rule`]().
455 |* bus=_rule
795 |* bus=_rule
456 (cook |=(a=@ [a ~]) bus)
796 (cook |=(a=@ [a ~]) bus)
459−Parser modifer. Parses an atom with `bus` and then wraps it in a
799+Examples
460−[`++list`]().
800+--------
462−`bus` is a [`++rule`]().
464− ~zod/try=> (scan "4" (piec:poja dem:ag))
802+ d~zod/try=> (scan "4" (piec:poja dem:ag))
467### `++pojo`
805### `++pojo`
469Print JSON
807Print JSON
809+Renders a [`++json`]() `val` as a [`++tape`]().
814+`val` is a [`json`]().
471 ++ pojo :: print json
824 ++ pojo :: print json
472 |= val=json
825 |= val=json
@@ -510,9 +863,8 @@ Print JSON
513−Renders a `++json` `val` as a [`++tape`]().
866+Examples
515−`val` is a [`json`]().
517 ~zod/try=> (pojo [%n '12.6'])
869 ~zod/try=> (pojo [%n '12.6'])
@@ -531,13 +883,27 @@ Renders a `++json` `val` as a [`++tape`]().
886+Renders a `++manx` `a` as a [`++tape`]().
891+`a` is a [`++manx`]().
534 ++ poxo :: node to tape
901 ++ poxo :: node to tape
535 =< |=(a=manx `tape`(apex a ~))
902 =< |=(a=manx `tape`(apex a ~))
536 |_ unq=? :: unq
903 |_ unq=? :: unq
538−Renders a `++manx` `a` as a [`++tape`]().
905+Examples
540−`a` is a [`++manx`]().
542 ~zod/try=> (poxo ;div;)
908 ~zod/try=> (poxo ;div;)
543 "<div></div>"
909 "<div></div>"
@@ -550,6 +916,23 @@ Renders a `++manx` `a` as a [`++tape`]().
551Inner XML printer
917Inner XML printer
919+Renders a [`++manx`]() as a [`++tape`](), appending a suffix `rez`.
921+XX is `rez/` a typo or is the `/` intentional
926+`rez` is a [`++tape`]().
553 ++ apex :: top level
936 ++ apex :: top level
554 |= [mex=manx rez=tape]
937 |= [mex=manx rez=tape]
@@ -566,9 +949,8 @@ Inner XML printer
566 ?~(att rez [' ' (attr att rez)])
949 ?~(att rez [' ' (attr att rez)])
569−Renders a `++manx` as a [`++tape`](), appending a suffix `rez\`.
952+Examples
571−`rez` is a [`++tape`]().
573 ~zod/try=> (apex:poxo ;div; "")
955 ~zod/try=> (apex:poxo ;div; "")
574 "<div></div>"
956 "<div></div>"
@@ -585,6 +967,23 @@ Renders a `++manx` as a [`++tape`](), appending a suffix `rez\`.
586Print attributes
968Print attributes
970+Render XML attributes as a [`++tape`]().
975+`tat` is a [`++mart`]().
588 ++ attr :: attributes to tape
987 ++ attr :: attributes to tape
589 |= [tat=mart rez=tape]
988 |= [tat=mart rez=tape]
@@ -596,11 +995,8 @@ Print attributes
596 (escp(unq |) v.i.tat '"' ?~(t.tat rez [' ' rez]))
995 (escp(unq |) v.i.tat '"' ?~(t.tat rez [' ' rez]))
599−Render XML attributes as a [`++tape`]().
998+Examples
601−`tat` is a [`++mart`]().
603−`rez` is a [`++tape`]().
605 ~zod/try=> (attr:poxo ~ "")
1001 ~zod/try=> (attr:poxo ~ "")
@@ -613,6 +1009,23 @@ Render XML attributes as a [`++tape`]().
614Escape XML
1010Escape XML
1012+Escapes the XML special characters `"`, `&`, `'`, `<`, `>`.
1017+`tex`is a [`++tape`]().
1019+`rez` is a `++tape`.
616 ++ escp :: escape for xml
1029 ++ escp :: escape for xml
617 |= [tex=tape rez=tape]
1030 |= [tex=tape rez=tape]
@@ -633,11 +1046,8 @@ Escape XML
636−Escapes the XML special characters `"`, `&`, `'`, `<`, `>`.
1049+Examples
638−`tex`is a [`++tape`]().
640−`rez` is a [`++tape`]().
642 ~zod/try=> (escp:poxo "astra" ~)
1052 ~zod/try=> (escp:poxo "astra" ~)
643 ~[~~a ~~s ~~t ~~r ~~a]
1053 ~[~~a ~~s ~~t ~~r ~~a]
@@ -652,15 +1062,29 @@ Escapes the XML special characters `"`, `&`, `'`, `<`, `>`.
653Print name
1063Print name
1065+Renders a [`++mane`]() as a [`++tape`]().
1070+`man` is a `++mane`.
655 ++ name :: name to tape
1080 ++ name :: name to tape
656 |= man=mane ^- tape
1081 |= man=mane ^- tape
657 ?@ man (trip man)
1082 ?@ man (trip man)
658 (weld (trip -.man) `tape`[':' (trip +.man)])
1083 (weld (trip -.man) `tape`[':' (trip +.man)])
661−Renders a `++mane` as a `++tape`.
1086+Examples
663−`man` is a [`++mane`]().
665 ~zod/try=> (name:poxo %$)
1089 ~zod/try=> (name:poxo %$)
@@ -673,6 +1097,23 @@ Renders a `++mane` as a `++tape`.
674Print node list
1098Print node list
1100+Renders multiple XML nodes as a [`++tape`]().
1105+`lix` is a [`++list`]() of [`++manx`]().
1107+`rez` is a `++tape`.
676 ++ many :: nodelist to tape
1117 ++ many :: nodelist to tape
677 |= [lix=(list manx) rez=tape]
1118 |= [lix=(list manx) rez=tape]
678 |- ^- tape
1119 |- ^- tape
@@ -680,11 +1121,8 @@ Print node list
680 (apex i.lix $(lix t.lix))
1121 (apex i.lix $(lix t.lix))
683−Renders multiple XML nodes as a [`++tape`]()
1124+Examples
685−`lix` is a [`++list`]() of [`++manx`]().
687−`rez` is a [`++tape`]().
689 ~zod/try=> (many:poxo ~ "")
1127 ~zod/try=> (many:poxo ~ "")
@@ -701,13 +1139,27 @@ Renders multiple XML nodes as a [`++tape`]()
702Parse XML
1140Parse XML
1142+Parses an XML node from a [`++cord`](), producing a [`++unit`]() [`++manx`]().
1147+`a` is a [`++cord`]().
704 ++ poxa :: xml parser
1157 ++ poxa :: xml parser
705 =< |=(a=cord (rush a apex))
1158 =< |=(a=cord (rush a apex))
708−Parses an XML node from a [`++cord`](), producing a unit [`++manx`]().
1161+Examples
710−`a` is a [`++cord`]().
712 ~zod/try=> (poxa '<div />')
1164 ~zod/try=> (poxa '<div />')
713 [~ [g=[n=%div a=~] c=~]]
1165 [~ [g=[n=%div a=~] c=~]]
@@ -722,6 +1174,21 @@ Parses an XML node from a [`++cord`](), producing a unit [`++manx`]().
723Top level parser
1175Top level parser
1177+Parses a node of XML, type [`++manx`]().
726 =+ spa=;~(pose comt whit)
1193 =+ spa=;~(pose comt whit)
727 %+ knee *manx |. ~+
1194 %+ knee *manx |. ~+
@@ -733,21 +1200,38 @@ Top level parser
736−Parses a node of XML, type [`++manx`]().
1203+Examples
738− ~zod/try=> (rash '<div />' apex:xmlp)
1206+ ~zod/try=> (rash '<div />' apex:poxa)
739 [g=[n=%div a=~] c=~]
1207 [g=[n=%div a=~] c=~]
740− ~zod/try=> (rash '<html><head/> <body/></html>' apex:xmlp)
1208+ ~zod/try=> (rash '<html><head/> <body/></html>' apex:poxa)
741 [g=[n=%html a=~] c=~[[g=[n=%head a=~] c=~] [g=[n=%body a=~] c=~]]]
1209 [g=[n=%html a=~] c=~[[g=[n=%head a=~] c=~] [g=[n=%body a=~] c=~]]]
742− ~zod/try=> (rash '<script src="/gep/hart.js"/>' apex:xmlp)
1210+ ~zod/try=> (rash '<script src="/gep/hart.js"/>' apex:poxa)
743 [g=[n=%script a=~[[n=%src v="/gep/hart.js"]]] c=~]
1211 [g=[n=%script a=~[[n=%src v="/gep/hart.js"]]] c=~]
744− ~zod/try=> (rash '<<<<' apex:xmlp)
1212+ ~zod/try=> (rash '<<<<' apex:poxa)
748−### `++attr`
1216+### `++attr`
1218+Parse XML attributes
1220+Parses the list of attributes inside the opening XML tag, which is zero
1221+or more space-prefixed name to string values.
750−Parse XML attributes
1226+A [`++nail`]().
752 ++ attr :: attributes
1236 ++ attr :: attributes
753 %+ knee *mart |. ~+
1237 %+ knee *mart |. ~+
@@ -761,23 +1245,23 @@ Parse XML attributes
764−Parses the list of attributes inside the opening XML tag, which is zero
1248+Examples
765−or more space-prefixed name to string values. Result type [`++mart`]()
1249+--------
767− ~zod/try=> (rash '' attr:xmlp)
1251+ ~zod/try=> (rash '' attr:poxa)
769− ~zod/try=> (rash 'sam=""' attr:xmlp)
1253+ ~zod/try=> (rash 'sam=""' attr:poxa)
772− ~zod/try=> (rash ' sam=""' attr:xmlp)
1256+ ~zod/try=> (rash ' sam=""' attr:poxa)
773 ~[[n=%sam v=""]]
1257 ~[[n=%sam v=""]]
774− ~zod/try=> (rash ' sam="hek"' attr:xmlp)
1258+ ~zod/try=> (rash ' sam="hek"' attr:poxa)
775 ~[[n=%sam v="hek"]]
1259 ~[[n=%sam v="hek"]]
776− ~zod/try=> (rash ' sam="hek" res="actor"' attr:xmlp)
1260+ ~zod/try=> (rash ' sam="hek" res="actor"' attr:poxa)
777 ~[[n=%sam v="hek"] [n=%res v="actor"]]
1261 ~[[n=%sam v="hek"] [n=%res v="actor"]]
778− ~zod/try=> (rash ' sam=\'hek\' res="actor"' attr:xmlp)
1262+ ~zod/try=> (rash ' sam=\'hek\' res="actor"' attr:poxa)
779 ~[[n=%sam v="hek"] [n=%res v="actor"]]
1263 ~[[n=%sam v="hek"] [n=%res v="actor"]]
780− ~zod/try=> (rash ' sam=\'hek" res="actor"' attr:xmlp)
1264+ ~zod/try=> (rash ' sam=\'hek" res="actor"' attr:poxa)
781 ! {1 23}
1265 ! {1 23}
@@ -785,18 +1269,34 @@ or more space-prefixed name to string values. Result type [`++mart`]()
786Parse character data
1270Parse character data
1272+Parsing rule. Parses XML character data.
788 ++ chrd :: character data
1287 ++ chrd :: character data
789 %+ cook |=(a=tape ^-(mars :/(a)))
1288 %+ cook |=(a=tape ^-(mars :/(a)))
790 (plus ;~(less soq doq ;~(pose (just `@`10) escp)))
1289 (plus ;~(less soq doq ;~(pose (just `@`10) escp)))
793−Parsing rule. Parses XML character data. Result type [`++mars`]()
1292+Examples
795− ~zod/try=> (rash 'asa' chrd:xmlp)
1295+ ~zod/try=> (rash 'asa' chrd:poxa)
796 [g=[n=%$ a=~[[n=%$ v="asa"]]] c=~]
1296 [g=[n=%$ a=~[[n=%$ v="asa"]]] c=~]
797− ~zod/try=> (rash 'asa > are' chrd:xmlp)
1297+ ~zod/try=> (rash 'asa > are' chrd:poxa)
798 [g=[n=%$ a=~[[n=%$ v="asa > are"]]] c=~]
1298 [g=[n=%$ a=~[[n=%$ v="asa > are"]]] c=~]
799− ~zod/try=> (rash 'asa > are' chrd:xmlp)
1299+ ~zod/try=> (rash 'asa > are' chrd:poxa)
@@ -804,6 +1304,21 @@ Parsing rule. Parses XML character data. Result type [`++mars`]()
805Parses comments
1305Parses comments
1307+Parsing rule. Parses XML comment blocks.
807 ++ comt :: comments
1322 ++ comt :: comments
808 =- (ifix [(jest '<!--') (jest '-->')] (star -))
1323 =- (ifix [(jest '<!--') (jest '-->')] (star -))
@@ -812,14 +1327,16 @@ Parses comments
812 ;~(less (jest '-->') hep)
1327 ;~(less (jest '-->') hep)
816−Parsing rule. Parses XML comment blocks.
1332+Examples
818− ~zod/try=> (rash '<!-- bye -->' comt:xmlp)
1335+ ~zod/try=> (rash '<!-- bye -->' comt:poxa)
820− ~zod/try=> (rash '<!-- bye ><<<>< - - -->' comt:xmlp)
1337+ ~zod/try=> (rash '<!-- bye ><<<>< - - -->' comt:poxa)
821 " bye ><<<>< - - "
1338 " bye ><<<>< - - "
822− ~zod/try=> (rash '<!-- invalid -->-->' comt:xmlp)
1339+ ~zod/try=> (rash '<!-- invalid -->-->' comt:poxa)
823 ! {1 18}
1340 ! {1 18}
@@ -827,6 +1344,22 @@ Parsing rule. Parses XML comment blocks.
828Parse (possibly) escaped char
1345Parse (possibly) escaped char
1347+Parsing rule. Parses a nonspecial or escaped character. Result type
1358+The [`++edge`]() of a [`++cord`]().
832 ;~(less gal gar pam prn)
1365 ;~(less gal gar pam prn)
@@ -837,42 +1370,59 @@ Parse (possibly) escaped char
837 (cold '\'' (jest '''))
1370 (cold '\'' (jest '''))
840−Parsing rule. Parses a nonspecial or escaped character. Result type
1373+Examples
841−[`++char`]()
1374+--------
843− ~zod/try=> (rash 'a' escp:xmlp)
1376+ ~zod/try=> (rash 'a' escp:poxa)
845− ~zod/try=> (rash 'ab' escp:xmlp)
1378+ ~zod/try=> (rash 'ab' escp:poxa)
848− ~zod/try=> (rash '.' escp:xmlp)
1381+ ~zod/try=> (rash '.' escp:poxa)
850− ~zod/try=> (rash '!' escp:xmlp)
1383+ ~zod/try=> (rash '!' escp:poxa)
852− ~zod/try=> (rash '>' escp:xmlp)
1385+ ~zod/try=> (rash '>' escp:poxa)
855− ~zod/try=> (rash '>' escp:xmlp)
1388+ ~zod/try=> (rash '>' escp:poxa)
857− ~zod/try=> (rash '"' escp:xmlp)
1390+ ~zod/try=> (rash '"' escp:poxa)
860### `++empt`
1393### `++empt`
862Parse self-closing tag
1395Parse self-closing tag
1397+Parsing rule. Parses self-closing XML tags that end in `/>`.
864 ++ empt :: self-closing tag
1413 ++ empt :: self-closing tag
865 %+ ifix [gal (jest '/>')]
1414 %+ ifix [gal (jest '/>')]
866 ;~(plug ;~(plug name attr) (cold ~ (star whit)))
1415 ;~(plug ;~(plug name attr) (cold ~ (star whit)))
869−Parsing rule. Parses self-closing XML tags that end in `/>`.
1418+Examples
871− ~zod/try=> (rash '<div/>' empt:xmlp)
1421+ ~zod/try=> (rash '<div/>' empt:poxa)
872 [[%div ~] ~]
1422 [[%div ~] ~]
873− ~zod/try=> (rash '<pre color="#eeffee" />' empt:xmlp)
1423+ ~zod/try=> (rash '<pre color="#eeffee" />' empt:poxa)
874 [[%pre ~[[n=%color v="#eeffee"]]] ~]
1424 [[%pre ~[[n=%color v="#eeffee"]]] ~]
875− ~zod/try=> (rash '<pre color="#eeffee"></pre>' empt:xmlp)
1425+ ~zod/try=> (rash '<pre color="#eeffee"></pre>' empt:poxa)
876 ! {1 21}
1426 ! {1 21}
@@ -880,18 +1430,34 @@ Parsing rule. Parses self-closing XML tags that end in `/>`.
881Parse opening tag
1431Parse opening tag
1433+Parsing rule. Parses the opening tag of an XML node. Result type
883 ++ head :: opening tag
1449 ++ head :: opening tag
884 (ifix [gal gar] ;~(plug name attr))
1450 (ifix [gal gar] ;~(plug name attr))
887−Parsing rule. Parses the opening tag of an XML node. Result type
1453+Examples
888−[`++marx`]()
1454+--------
890− ~zod/try=> (rash '<a>' head:xmlp)
1456+ ~zod/try=> (rash '<a>' head:poxa)
891 [n=%a a=~]
1457 [n=%a a=~]
892− ~zod/try=> (rash '<div mal="tok">' head:xmlp)
1458+ ~zod/try=> (rash '<div mal="tok">' head:poxa)
893 [n=%div a=~[[n=%mal v="tok"]]]
1459 [n=%div a=~[[n=%mal v="tok"]]]
894− ~zod/try=> (rash '<div mal="tok" />' head:xmlp)
1460+ ~zod/try=> (rash '<div mal="tok" />' head:poxa)
895 ! {1 16}
1461 ! {1 16}
@@ -899,6 +1465,21 @@ Parsing rule. Parses the opening tag of an XML node. Result type
900Parse tag name
1466Parse tag name
1468+Parsing rule. Parses the name of an XML tag.
1478+An [`++edge`]() of a [`++mane`]().
902 ++ name :: tag name
1483 ++ name :: tag name
903 %+ knee *mane |. ~+
1484 %+ knee *mane |. ~+
904 =+ ^= chx
1485 =+ ^= chx
@@ -910,15 +1491,16 @@ Parse tag name
910 ;~(pose ;~(plug ;~(sfix chx col) chx) chx)
1491 ;~(pose ;~(plug ;~(sfix chx col) chx) chx)
913−Parsing rule. Parses the name of an XML tag. Result type [`++mane`]()
1494+Examples
915− ~zod/try=> (scan "ham" name:xmlp)
1497+ ~zod/try=> (scan "ham" name:poxa)
917− ~zod/try=> (scan "ham:tor" name:xmlp)
1499+ ~zod/try=> (scan "ham:tor" name:poxa)
918 [%ham %tor]
1500 [%ham %tor]
919− ~zod/try=> (scan "ham-tor" name:xmlp)
1501+ ~zod/try=> (scan "ham-tor" name:poxa)
920 %ham-tor
1502 %ham-tor
921− ~zod/try=> (scan "ham tor" name:xmlp)
1503+ ~zod/try=> (scan "ham tor" name:poxa)
@@ -926,15 +1508,31 @@ Parsing rule. Parses the name of an XML tag. Result type [`++mane`]()
927Parse closing tag
1509Parse closing tag
1511+Parsing rule. Parses an XML closing tag.
929 ++ tail (ifix [(jest '</') gar] name) :: closing tag
1526 ++ tail (ifix [(jest '</') gar] name) :: closing tag
931−Parsing rule. Parses an XML closing tag.
1528+Examples
933− ~zod/try=> (scan "</div>" tail:xmlp)
1531+ ~zod/try=> (scan "</div>" tail:poxa)
935− ~zod/try=> (scan "</a>" tail:xmlp)
1533+ ~zod/try=> (scan "</a>" tail:poxa)
937− ~zod/try=> (scan "</>" tail:xmlp)
1535+ ~zod/try=> (scan "</>" tail:poxa)
@@ -942,21 +1540,37 @@ Parsing rule. Parses an XML closing tag.
943Parse whitespace, etc.
1541Parse whitespace, etc.
1543+Parsing rule. Parses newlines, tabs, and spaces.
945 ++ whit (mask ~[' ' `@`0x9 `@`0xa]) :: whitespace
1558 ++ whit (mask ~[' ' `@`0x9 `@`0xa]) :: whitespace
948−Parsing rule. Parses newlines, tabs, and spaces.
1561+Examples
950− ~zod/try=> `@`(scan " " whit:xmlp)
1564+ ~zod/try=> `@`(scan " " whit:poxa)
952− ~zod/try=> `@`(scan " " whit:xmlp)
1566+ ~zod/try=> `@`(scan " " whit:poxa)
955− ~zod/try=> `@`(scan "\0a" whit:xmlp)
1569+ ~zod/try=> `@`(scan "\0a" whit:poxa)
957− ~zod/try=> `@`(scan "\09" whit:xmlp)
1571+ ~zod/try=> `@`(scan "\09" whit:poxa)
959− ~zod/try=> `@`(scan "\08" whit:xmlp)
1573+ ~zod/try=> `@`(scan "\08" whit:poxa)
@@ -964,21 +1578,46 @@ Parsing rule. Parses newlines, tabs, and spaces.
965JSON reparsing core
1579JSON reparsing core
967− ++ jo :: json reparser
1581+Contains converters of [`++json`]() to [`++unit`]()s of well-typed structures.
968− => |% ++ grub (unit ,*)
969− ++ fist $+(json grub)
972−Contains converters of ++json to [`++unit`]() well-typed structures.
1583+Accepts
974A `fist` is a gate that produces a `grub`.
1586A `fist` is a gate that produces a `grub`.
976A `grub` is a unit of some JSON value.
1588A `grub` is a unit of some JSON value.
1593+ ++ jo :: json reparser
1594+ => |% ++ grub (unit ,*)
1595+ ++ fist $+(json grub)
978### `++ar`
1599### `++ar`
980Parse array to list
1601Parse array to list
1603+Reparser modifier. Reparses an array to the [`++unit`]() of a homogenous
1604+[`++list`]() using `wit` to reparse every element.
1606+`wit` is a [`++fist`](), a JSON reparser.
982 ++ ar :: array as list
1621 ++ ar :: array as list
983 |* wit=fist
1622 |* wit=fist
984 |= jon=json
1623 |= jon=json
@@ -989,19 +1628,34 @@ Parse array to list
989 [i=(wit i.p.jon) t=$(p.jon t.p.jon)]
1628 [i=(wit i.p.jon) t=$(p.jon t.p.jon)]
992−Reparser modifier. Reparses an array to the [`++unit`]() of a homogenous
1631+Examples
993−[`++list`]() using `wit` to reparse every element.
1632+--------
995−`wit` is a [`++fist`](), a JSON reparser.
997 ~zod/try=> :type; ((ar ni):jo a/~[n/'1' n/'2'])
1634 ~zod/try=> :type; ((ar ni):jo a/~[n/'1' n/'2'])
998 [~ u=~[1 2]]
1635 [~ u=~[1 2]]
999 {[%~ u=it(@)] %~}
1636 {[%~ u=it(@)] %~}
1001### `++at`
1639### `++at`
1003Reparse array as tuple
1641Reparse array as tuple
1643+Reparser generator. Reparses an array as a fixed-length tuple of
1644+[`++unit`]()s, using a list of `++fist`s.
1649+`wil` is a [`++pole`](), a [`face`]()less list of [`++fist`]()s.
1005 ++ at :: array as tuple
1659 ++ at :: array as tuple
1006 |* wil=(pole fist)
1660 |* wil=(pole fist)
1007 |= jon=json
1661 |= jon=json
@@ -1010,10 +1664,8 @@ Reparse array as tuple
1010 ?.((za raw) ~ (some (zp raw)))
1664 ?.((za raw) ~ (some (zp raw)))
1013−Reparser generator. Reparses an array as a fixed-length tuple of
1667+Examples
1014−[`++unit`]()s, using a list of `++fist`s.
1668+--------
1016−`wil` is a [`++pole`]() a [`face`]()less list of [`++fist`]()s.
1018 ~zod/try=> ((at ni so ni ~):jo a/~[n/'3' s/'to' n/'4'])
1670 ~zod/try=> ((at ni so ni ~):jo a/~[n/'3' s/'to' n/'4'])
1019 [~ u=[q=3 ~.to q=4]]
1671 [~ u=[q=3 ~.to q=4]]
@@ -1027,6 +1679,21 @@ Reparser generator. Reparses an array as a fixed-length tuple of
1028Reparse array to tuple
1680Reparse array to tuple
1682+Reparser generator. Reparses a list of [`++json`]() with `wil` to a tuple of [`++unit`]()s.
1687+`wil` is a [`++pole`](), a [face]()less list of [`++fist`]()s.
1030 ++ at-raw :: array as tuple
1697 ++ at-raw :: array as tuple
1031 |* wil=(pole fist)
1698 |* wil=(pole fist)
1032 |= jol=(list json)
1699 |= jol=(list json)
@@ -1035,10 +1702,8 @@ Reparse array to tuple
1035 ((at-raw +.wil) ?~(jol ~ t.jol))
1702 ((at-raw +.wil) ?~(jol ~ t.jol))
1038−Reparser generator. Reparses a list of [`++json`]() to a tuple of
1705+Examples
1039−[`++unit`]() using `wil`.
1706+--------
1041−`wil` is a [`++pole`](), a [face]()less list of [`++fist`]()s.
1043 ~zod/try=> ((at-raw ni ni bo ~):jo ~[s/'hi' n/'1' b/&])
1708 ~zod/try=> ((at-raw ni ni bo ~):jo ~[s/'hi' n/'1' b/&])
1044 [~ [~ 1] [~ u=%.y] ~]
1709 [~ [~ 1] [~ u=%.y] ~]
@@ -1047,12 +1712,28 @@ Reparser generator. Reparses a list of [`++json`]() to a tuple of
1048Reparse boolean
1713Reparse boolean
1715+Reparser modifier. Reparses a boolean to the [`++unit`]() of a
1050 ++ bo :: boolean
1731 ++ bo :: boolean
1051 |=(jon=json ?.(?=([%b *] jon) ~ [~ u=p.jon]))
1732 |=(jon=json ?.(?=([%b *] jon) ~ [~ u=p.jon]))
1054−Reparser modifier. Reparses a boolean to the [`++unit`]() of a
1735+Examples
1055−[`loobean`]().
1736+--------
1057 ~zod/try=> (bo:jo [%b &])
1738 ~zod/try=> (bo:jo [%b &])
1058 [~ u=%.y]
1739 [~ u=%.y]
@@ -1065,12 +1746,29 @@ Reparser modifier. Reparses a boolean to the [`++unit`]() of a
1066Reparse boolean not
1747Reparse boolean not
1749+Reparser modifier. Reparses the inverse of a boolean to the [`++unit`]()
1068 ++ bu :: boolean not
1766 ++ bu :: boolean not
1069 |=(jon=json ?.(?=([%b *] jon) ~ [~ u=!p.jon]))
1767 |=(jon=json ?.(?=([%b *] jon) ~ [~ u=!p.jon]))
1072−Reparser modifier. Reparses the inverse of a boolean to the [`++unit`]()
1770+Examples
1073−of a loobean.
1771+--------
1075 ~zod/try=> (bu:jo [%b &])
1773 ~zod/try=> (bu:jo [%b &])
1076 [~ u=%.n]
1774 [~ u=%.n]
@@ -1083,19 +1781,33 @@ of a loobean.
1084Reparse and transform
1782Reparse and transform
1087− |* [poq=$+(* *) wit=fist]
1089− (bind (wit jon) poq)
1092Reparser modifier. Reparses `jon` and slams the result through `wit`,
1784Reparser modifier. Reparses `jon` and slams the result through `wit`,
1093producing a [`++unit`]().
1785producing a [`++unit`]().
1095`wit` is a [`++fist`]().
1790`wit` is a [`++fist`]().
1097`poq` is a [`gate`]() that accepts and returns a [noun]().
1792`poq` is a [`gate`]() that accepts and returns a [noun]().
1803+ |* [poq=$+(* *) wit=fist]
1805+ (bind (wit jon) poq)
1099 ~zod/try=> ((cu dec ni):jo [%n '20'])
1811 ~zod/try=> ((cu dec ni):jo [%n '20'])
1101 ~zod/try=> ((cu dec ni):jo [%b &])
1813 ~zod/try=> ((cu dec ni):jo [%b &])
@@ -1105,13 +1817,29 @@ producing a [`++unit`]().
1106Reparse UTC date
1818Reparse UTC date
1820+Reparser modifier. Reparses a UTC date string to a [`++unit`]().
1825+`jon` is a [`++json`]().
1108 ++ da :: UTC date
1835 ++ da :: UTC date
1109 |= jon=json
1836 |= jon=json
1110 ?. ?=([%s *] jon) ~
1837 ?. ?=([%s *] jon) ~
1111 (bind (stud (trip p.jon)) |=(a=date (year a)))
1838 (bind (stud (trip p.jon)) |=(a=date (year a)))
1114−Reparser modifier. Reparses a UTC date string to a [`++unit`]().
1841+Examples
1116 ~zod/try=> (da:jo [%s 'Wed, 29 Oct 2014 0:26:15 +0000'])
1844 ~zod/try=> (da:jo [%s 'Wed, 29 Oct 2014 0:26:15 +0000'])
1117 [~ ~2014.10.29..00.26.15]
1845 [~ ~2014.10.29..00.26.15]
@@ -1124,6 +1852,22 @@ Reparser modifier. Reparses a UTC date string to a [`++unit`]().
1125Reparse millisecond date
1853Reparse millisecond date
1855+Reparser modifier. Reparses the javascript millisecond date integer to a
1861+`jon` is a [`++json`]().
1127 ++ di :: millisecond date
1871 ++ di :: millisecond date
1128 |= jon=json
1872 |= jon=json
1129 %+ bind (ni jon)
1873 %+ bind (ni jon)
@@ -1131,8 +1875,8 @@ Reparse millisecond date
1131 (add ~1970.1.1 (div (mul ~s1 a) 1.000))
1875 (add ~1970.1.1 (div (mul ~s1 a) 1.000))
1134−Reparser modifier. Reparses the JavaScript millisecond date integer to a
1878+Examples
1135−[`++unit`]().
1879+--------
1137 ~zod/try=> (di:jo [%s '2014-10-29'])
1881 ~zod/try=> (di:jo [%s '2014-10-29'])
@@ -1147,18 +1891,32 @@ Reparser modifier. Reparses the JavaScript millisecond date integer to a
1148Reparse unit
1892Reparse unit
1894+Reparser modifier. Reparses `wit` to a [`++unit`]().
1896+JSON units are considered to be either JSON null or the requested
1897+value, and are reparsed to results of \~ or (some {value}) respectively.
1902+`wit` is a [`++fist`]().
1150 ++ mu :: true unit
1912 ++ mu :: true unit
1151 |* wit=fist
1913 |* wit=fist
1152 |= jon=json
1914 |= jon=json
1153 ?~(jon (some ~) (bind (wit jon) some))
1915 ?~(jon (some ~) (bind (wit jon) some))
1156−Reparser modifier. Reparses `wit` to a [`++unit`]().
1918+Examples
1158−A- JSON units are considered to be either JSON null or the requested
1159−value, and are reparsed to results of \~ or (some {value}) respectively
1161−`wit` is a [`++fist`]().
1163 ~zod/try=> ((mu ni):jo [%n '20'])
1921 ~zod/try=> ((mu ni):jo [%n '20'])
1164 [~ [~ u=q=20]]
1922 [~ [~ u=q=20]]
@@ -1173,12 +1931,6 @@ value, and are reparsed to results of \~ or (some {value}) respectively
1174Reparse number as real
1932Reparse number as real
1176− ++ ne :: number as real
1182XX Currently unimplemented
1934XX Currently unimplemented
1184A- yup, this will eventually reparse a floating point atom, but
1936A- yup, this will eventually reparse a floating point atom, but
@@ -1188,13 +1940,29 @@ interfaces for the latter are not currently stable.
1189Reparse number as integer
1941Reparse number as integer
1943+Reparser modifier. Reparses an integer representation to a [`++unit]().
1948+`jon` is a ++[`++json`]().
1953+The `++unit` of an atom.
1191 ++ ni :: number as integer
1958 ++ ni :: number as integer
1192 |= jon=json
1959 |= jon=json
1193 ?. ?=([%n *] jon) ~
1960 ?. ?=([%n *] jon) ~
1194 (rush p.jon dem)
1961 (rush p.jon dem)
1197−Reparser modifier. Reparses an integer representation to a [\`++unit]().
1964+Examples
1199 ~zod/try=> (ni:jo [%n '0'])
1967 ~zod/try=> (ni:jo [%n '0'])
@@ -1215,13 +1983,29 @@ Reparser modifier. Reparses an integer representation to a [\`++unit]().
1216Reparse number as text
1984Reparse number as text
1986+Reparser modifier. Reparses a numeric representation to a [++cord]().
1991+`jon` is a `++json`.
1996+The [`++unit`]() of a `++cord`.
1218 ++ no :: number as text
2001 ++ no :: number as text
1219 |= jon=json
2002 |= jon=json
1220 ?. ?=([%n *] jon) ~
2003 ?. ?=([%n *] jon) ~
1221 (some p.jon)
2004 (some p.jon)
1224−Reparser modifier. Reparses a numeric representation to a [++cord]().
2007+Examples
1226 ~zod/try=> (no:jo [%n '0'])
2010 ~zod/try=> (no:jo [%n '0'])
1227 [~ u=~.0]
2011 [~ u=~.0]
@@ -1242,6 +2026,23 @@ Reparser modifier. Reparses a numeric representation to a [++cord]().
1243Reparse object to frond
2027Reparse object to frond
2029+Reparser generator. Reparses an object, succeeding if it corresponds to
2030+one of the key-value pairs in `wer`.
2035+`wer` is a [`++pole`](), a [`++face`]()less list of [`++cord`]() and
2036+[`++fist`]() key-value pairs.
2041+The [`++unit`]() of a cell of a.....
1245 ++ of :: object as frond
2046 ++ of :: object as frond
1246 |* wer=(pole ,[cord fist])
2047 |* wer=(pole ,[cord fist])
1247 |= jon=json
2048 |= jon=json
@@ -1253,11 +2054,8 @@ Reparse object to frond
1253 ((of +.wer) jon)
2054 ((of +.wer) jon)
1256−Reparser generator. Reparses an object, succeeding if it corresponds to
2057+Examples
1257−one of the key-value pairs in `wer`.
2058+--------
1259−`wer` is a [`++pole`](), a [`++face`]()less list of [`++cord`]() and
1260−[`++fist`]() key-value pairs.
1262 ~zod/try=> ((of sem/sa som/ni ~):jo %o [%sem s/'hi'] ~ ~)
2060 ~zod/try=> ((of sem/sa som/ni ~):jo %o [%sem s/'hi'] ~ ~)
1263 [~ [%sem "hi"]]
2061 [~ [%sem "hi"]]
@@ -1282,6 +2080,24 @@ one of the key-value pairs in `wer`.
1283Reparse object as tuple
2081Reparse object as tuple
2083+Reparser generator. For every key in `wer` that matches a key in the
2084+[`++edge`], the fist in `wer` is applied to the corresponding value in
2085+the [`++edge`](), the results of which are produced in a tuple.
2091+`wer` is a [`++pole`]() of [`++cord`]() to [`++fist`]() key-value pairs.
2096+A [`++unit`]() of a tuple XX?
1285 ++ ot :: object as tuple
2101 ++ ot :: object as tuple
1286 |* wer=(pole ,[cord fist])
2102 |* wer=(pole ,[cord fist])
1287 |= jon=json
2103 |= jon=json
@@ -1290,11 +2106,8 @@ Reparse object as tuple
1290 ?.((za raw) ~ (some (zp raw)))
2106 ?.((za raw) ~ (some (zp raw)))
1293−Reparser generator. For every key in `wer` that matches a key in the
2109+Examples
1294−[`++edge`], the fist in `wer` is applied to the corresponding value in
2110+--------
1295−the [`++edge`](), the results of which are produced in a tuple.
1297−`wer` is a [`++pole`]() of [`++cord`]() to [`++fist`]() key-value pairs.
1299 ~zod/try=> (jobe [%sem s/'ha'] [%som n/'20'] ~)
2112 ~zod/try=> (jobe [%sem s/'ha'] [%som n/'20'] ~)
1300 [%o p={[p='sem' q=[%s p=~.ha]] [p='som' q=[%n p=~.20]]}]
2113 [%o p={[p='sem' q=[%s p=~.ha]] [p='som' q=[%n p=~.20]]}]
@@ -1303,6 +2116,25 @@ the [`++edge`](), the results of which are produced in a tuple.
1304### `++ot-raw`
2117### `++ot-raw`
2119+Reparser generator. Reparses a map `jom` using `wer`; for every key in
2120+`wer` that matches a key in `map`, the corresponding `++fist` is applied
2121+to the corresponding value in `jom`, the results of which are produced
2128+`wer` is a [`++pole`]() of [`++cord`]() to [`++fist`]() key-value pairs.
1306 ++ ot-raw :: object as tuple
2138 ++ ot-raw :: object as tuple
1307 |* wer=(pole ,[cord fist])
2139 |* wer=(pole ,[cord fist])
1308 |= jom=(map ,@t json)
2140 |= jom=(map ,@t json)
@@ -1311,10 +2143,8 @@ the [`++edge`](), the results of which are produced in a tuple.
1311 [?~(ten ~ (+.-.wer u.ten)) ((ot-raw +.wer) jom)]
2143 [?~(ten ~ (+.-.wer u.ten)) ((ot-raw +.wer) jom)]
1314−Reparser generator. Reparses a map `jom` using `wer`; for every key in
2146+Examples
1315−`wer` that matches a key in `map`, the corresponding `++fist` is applied
2147+--------
1316−to the corresponding value in `jom`, the results of which are produced
1319 ~zod/try=> ((ot-raw sem/sa som/ni sem/sa ~):jo (mo [%sem s/'ha'] [%som n/'20'] ~))
2149 ~zod/try=> ((ot-raw sem/sa som/ni sem/sa ~):jo (mo [%sem s/'ha'] [%som n/'20'] ~))
1320 [[~ u="ha"] [~ q=20] [~ u="ha"] ~]
2150 [[~ u="ha"] [~ q=20] [~ u="ha"] ~]
@@ -1325,6 +2155,22 @@ in a tuple.
1326Parse object to map
2156Parse object to map
2158+Reparser modifier. Reparses a [`++json`]() object to a homogenous map
2164+`wit` is a [`++fist`]().
2169+A [`++unit`]() of...
1328 ++ om :: object as map
2174 ++ om :: object as map
1329 |* wit=fist
2175 |* wit=fist
1330 |= jon=json
2176 |= jon=json
@@ -1332,10 +2178,8 @@ Parse object to map
1332 (zm ~(run by p.jon) wit)
2178 (zm ~(run by p.jon) wit)
1335−Reparser modifier. Reparses a [`++json`]() object to a homogenous map
2181+Examples
1336−using `wit`.
2182+--------
1338−`wit` is a [`++fist`]().
1340 ~zod/try=> ((om ni):jo (jobe [%sap n/'20'] [%sup n/'5'] [%sop n/'177'] ~))
2184 ~zod/try=> ((om ni):jo (jobe [%sap n/'20'] [%sup n/'5'] [%sop n/'177'] ~))
1341 [~ {[p='sup' q=q=5] [p='sop' q=q=177] [p='sap' q=q=20]}]
2185 [~ {[p='sup' q=q=5] [p='sop' q=q=177] [p='sap' q=q=20]}]
@@ -1346,15 +2190,29 @@ using `wit`.
1347Add prefix
2191Add prefix
2193+Reparser modifier. Adds a static prefix `pre` to the parse result of
2194+`wit`. See also: [`++stag`]().
2199+`pre` is a prefix [`noun`]().
2204+The [`++unit`]() of a cell of [noun]() and the result of parsing `wit`.
1349 ++ pe :: prefix
2209 ++ pe :: prefix
1350 |* [pre=* wit=fist]
2210 |* [pre=* wit=fist]
1351 (cu |*(a=* [pre a]) wit)
2211 (cu |*(a=* [pre a]) wit)
1354−Reparser modifier. Adds a static prefix `pre` to the parse result of
2214+Examples
1355−`wit`. See also: [`++stag`]().
2215+--------
1357−`pre` is a prefix [`noun`]().
1359 ~zod/try=> (ni:jo n/'2')
2217 ~zod/try=> (ni:jo n/'2')
@@ -1369,12 +2227,28 @@ Reparser modifier. Adds a static prefix `pre` to the parse result of
1370Reparse string to tape
2228Reparse string to tape
2230+Reparser modifier. Reparses a [`++json`]() string to a [`++tape`]().
2235+`jon` is a [`++json`]().
2240+The [`++unit`]() of a [`++tape`]().
1372 ++ sa :: string as tape
2245 ++ sa :: string as tape
1373 |= jon=json
2246 |= jon=json
1374 ?.(?=([%s *] jon) ~ (some (trip p.jon)))
2247 ?.(?=([%s *] jon) ~ (some (trip p.jon)))
1377−Reparser modifier. Reparses a [`++json`]() string to a [`++tape`]().
2250+Examples
1379 ~zod/try=> (sa:jo s/'value')
2253 ~zod/try=> (sa:jo s/'value')
1380 [~ u="value"]
2254 [~ u="value"]
@@ -1387,12 +2261,28 @@ Reparser modifier. Reparses a [`++json`]() string to a [`++tape`]().
1388Reparse string to cord
2262Reparse string to cord
2264+Reparser modifier. Reparses a string to a [`++cord`]().
2269+`jon` is a [`++json`]().
2274+The [`++unit`]() of a [`++cord`]().
1390 ++ so :: string as cord
2279 ++ so :: string as cord
1391 |= jon=json
2280 |= jon=json
1392 ?.(?=([%s *] jon) ~ (some p.jon))
2281 ?.(?=([%s *] jon) ~ (some p.jon))
1395−Reparser modifier. Reparses a string to a [`++cord`]().
2284+Examples
1397 ~zod/try=> (so:jo s/'value')
2287 ~zod/try=> (so:jo s/'value')
1398 [~ u=~.value]
2288 [~ u=~.value]
@@ -1405,6 +2295,21 @@ Reparser modifier. Reparses a string to a [`++cord`]().
1406Reparse string
2296Reparse string
2298+Reparser generator. Produces a reparser that applies `sab` to a string.
2303+`sab` is a [`++rule`].
1408 ++ su :: parse string
2313 ++ su :: parse string
1409 |* sab=rule
2314 |* sab=rule
1410 |= jon=json
2315 |= jon=json
@@ -1412,9 +2317,8 @@ Reparse string
1412 (rush p.jon sab)
2317 (rush p.jon sab)
1415−Reparser generator. Produces a reparser that applies `sab` to a string.
2320+Examples
1417−`sab` is a [`++rule`]().
1419 ~zod/try=> ((su:jo fed:ag) s/'zod')
2323 ~zod/try=> ((su:jo fed:ag) s/'zod')
@@ -1429,9 +2333,25 @@ Reparser generator. Produces a reparser that applies `sab` to a string.
1430Reparse null
2334Reparse null
2336+Reparser modifier. Reparses a null value.
2341+`jon` is a [`++json`]().
2346+The [`++unit`]() of null.
1432 ++ ul |=(jon=json ?~(jon (some ~) ~)) :: null
2351 ++ ul |=(jon=json ?~(jon (some ~) ~)) :: null
1434−Reparser modifier. Reparses a null value.
2353+Examples
1436 ~zod/try=> (ul:jo `json`~)
2356 ~zod/try=> (ul:jo `json`~)
@@ -1446,6 +2366,22 @@ Reparser modifier. Reparses a null value.
1447Pole of nonempty units
2367Pole of nonempty units
2369+Determines if `pod` contains all non-empty units, producing a boolean. Used
2375+`pod` is a [`++pole`]() of [`++unit`]().
1449 ++ za :: full unit pole
2385 ++ za :: full unit pole
1450 |* pod=(pole (unit))
2386 |* pod=(pole (unit))
1451 ?~ pod &
2387 ?~ pod &
@@ -1453,10 +2389,8 @@ Pole of nonempty units
1453 (za +.pod)
2389 (za +.pod)
1456−Determines if `pod` contains no empty units, producing a loobean. Used
2392+Examples
1457−internally.
2393+--------
1459−`pod` is a [`++pole`]() of [`++unit`]().
1461 ~zod/try=> (za:jo ~[`1 `2 `3])
2395 ~zod/try=> (za:jo ~[`1 `2 `3])
@@ -1467,6 +2401,22 @@ internally.
1468Collapse unit list
2402Collapse unit list
2404+Produces a unit of the values of `lut` if every unit in `lut` is
2405+nonempty. Otherwise, produces `~`.
2410+`lut` is a [`++list`]() of [`++unit`]()s.
1470 ++ zl :: collapse unit list
2420 ++ zl :: collapse unit list
1471 |* lut=(list (unit))
2421 |* lut=(list (unit))
1472 ?. |- ^- ?
2422 ?. |- ^- ?
@@ -1478,11 +2428,8 @@ Collapse unit list
1478 [i=u:+.i.lut t=$(lut t.lut)]
2428 [i=u:+.i.lut t=$(lut t.lut)]
1481−Produces a unit of the values of `lut` if every unit in `lut` is
2431+Examples
1482−nonempty. Otherwise, produces `~`. If any of the `++unit`s in `lut` are
2432+--------
1483−empty, produces null.
1485−`lut` is a [`++list`]() of [`++unit`]()s.
1487 ~zod/try=> (zl:jo `(list (unit))`~[`1 `2 `3])
2434 ~zod/try=> (zl:jo `(list (unit))`~[`1 `2 `3])
1488 [~ u=~[1 2 3]]
2435 [~ u=~[1 2 3]]
@@ -1493,7 +2440,22 @@ empty, produces null.
1494### `++zp`
2441### `++zp`
2445+Collapses a `++pole` of `++unit`s `but`, producing a tuple.
2450+`but` is a [`++pole`]() of [`++unit`]().
1498 ++ zp :: unit tuple
2460 ++ zp :: unit tuple
1499 |* but=(pole (unit))
2461 |* but=(pole (unit))
@@ -1503,9 +2465,8 @@ Parses a
1503 [u:->.but (zp +.but)]
2465 [u:->.but (zp +.but)]
1506−Collapses a `++pole` of `++unit`s `but`, producing a tuple.
2468+Examples
1508−`but` is a [`++pole`]() of [`++unit`]().
1510 ~zod/try=> (zp:jo `(pole (unit))`~[`1 `2 `3])
2471 ~zod/try=> (zp:jo `(pole (unit))`~[`1 `2 `3])
@@ -1518,6 +2479,24 @@ Collapses a `++pole` of `++unit`s `but`, producing a tuple.
1519Collapse unit map
2480Collapse unit map
2482+Produces a [`++unit`]() of the [`++map`]() `lum` of term to `++unit` key value
2483+pairs, with all of the nonempty values stripped of their `++unit`
2484+wrappers. If any of the `++units` in `lum` are empty, `~` is produced.
2485+See also: [`++zp`](), [`++zl`]().
2490+`lum` is a map of [`++term`]() to [`++unit`]()s.
2495+The `++unit` of a tuple of what were the key-value pairs of `lum`.
1521 ++ zm :: collapse unit map
2500 ++ zm :: collapse unit map
1522 |* lum=(map term (unit))
2501 |* lum=(map term (unit))
1523 ?: (~(rep by lum) | |=([[@ a=(unit)] b=?] |(b ?=(~ a))))
2502 ?: (~(rep by lum) | |=([[@ a=(unit)] b=?] |(b ?=(~ a))))
@@ -1525,12 +2504,8 @@ Collapse unit map
1525 (some (~(run by lum) need))
2504 (some (~(run by lum) need))
1528−Produces a `++unit` of the map `lum` of term to `++unit` key value
2507+Examples
1529−pairs, with all of the nonempty values stripped of their `++unit`
2508+--------
1530−wrappers. If any of the `++units` in `lum` are empty, `~` is produced.
1531−See also: [`++zp`](), [`++zl`]().
1533−`lum` is a map of [`++term`]() to [`++unit`]()s.
1535 ~zod/try=> (zm:jo `(map term (unit ,@u))`(mo a/`4 b/`1 c/`2 ~))
2510 ~zod/try=> (zm:jo `(map term (unit ,@u))`(mo a/`4 b/`1 c/`2 ~))
1536 [~ {[p=%a q=4] [p=%c q=2] [p=%b q=1]}]
2511 [~ {[p=%a q=4] [p=%c q=2] [p=%b q=1]}]
@@ -1549,17 +2524,31 @@ See also: [`++zp`](), [`++zl`]().
1550`++json` from key-value pair
2525`++json` from key-value pair
2527+Produces a ++json object with one key-value pair.
2534+`q` is a [`++json`]().
1552 ++ joba :: object from k-v pair
2544 ++ joba :: object from k-v pair
1553 |= [p=@t q=json]
2545 |= [p=@t q=json]
1555 [%o [[p q] ~ ~]]
2547 [%o [[p q] ~ ~]]
1558−Produces a ++json object with one key.
2550+Examples
1562−`q` is a [`++json`]().
1564 ~zod/try=> (joba %hi %b |)
2553 ~zod/try=> (joba %hi %b |)
1565 [%o p={[p='hi' q=[%b p=%.n]]}]
2554 [%o p={[p='hi' q=[%b p=%.n]]}]
@@ -1574,15 +2563,29 @@ Produces a ++json object with one key.
1575Object from key-value list
2564Object from key-value list
2566+Produces a `++json` object from a [`++list`]() `a` of key to `++json` values.
2571+`a` is a [`++list`]() of [`++cord`]() to [`++json`]() values.
1577 ++ jobe :: object from k-v list
2581 ++ jobe :: object from k-v list
1578 |= a=(list ,[p=@t q=json])
2582 |= a=(list ,[p=@t q=json])
1580 [%o (~(gas by *(map ,@t json)) a)]
2584 [%o (~(gas by *(map ,@t json)) a)]
1583−Produces a `++json` object from a list `a` of key to `++json` values.
2587+Examples
1585−`a` is a [`++list`]() of [`++cord`]() to [`++json`]() values.
1587 ~zod/try=> (jobe a/n/'20' b/~ c/a/~[s/'mol'] ~)
2590 ~zod/try=> (jobe a/n/'20' b/~ c/a/~[s/'mol'] ~)
1588 [%o p={[p='a' q=[%n p=~.20]] [p='c' q=[%a p=~[[%s p=~.mol]]]] [p='b' q=~]}]
2591 [%o p={[p='a' q=[%n p=~.20]] [p='c' q=[%a p=~[[%s p=~.mol]]]] [p='b' q=~]}]
@@ -1593,13 +2596,29 @@ Produces a `++json` object from a list `a` of key to `++json` values.
1594`++json` string from tape
2597`++json` string from tape
2599+Produces a [`++json`]() string from a [`++tape`]().
1596 ++ jape :: string from tape
2614 ++ jape :: string from tape
1597 |= a=tape
2615 |= a=tape
1599 [%s (crip a)]
2617 [%s (crip a)]
1602−Produces a [`++json`]() string from a [`++tape`]().
2620+Examples
1604 ~zod/try=> (jape ~)
2623 ~zod/try=> (jape ~)
1605 [%s p=~.]
2624 [%s p=~.]
@@ -1614,6 +2633,21 @@ Produces a [`++json`]() string from a [`++tape`]().
1615`++json` number from unigned
2634`++json` number from unigned
2636+Produces a `++json` number from an unsigned atom.
2641+`a` is an atom of odor [`@u`]().
1617 ++ jone :: number from unsigned
2651 ++ jone :: number from unsigned
@@ -1622,9 +2656,8 @@ Produces a [`++json`]() string from a [`++tape`]().
1622 (crip (flop |-(^-(tape ?:(=(0 a) ~ [(add '0' (mod a 10)) $(a (div a 10))])))))
2656 (crip (flop |-(^-(tape ?:(=(0 a) ~ [(add '0' (mod a 10)) $(a (div a 10))])))))
1625−Produces a `++json` number from an unsigned atom.
2659+Examples
1629 ~zod/try=> (jone 1)
2662 ~zod/try=> (jone 1)
1630 [%n p=~.1]
2663 [%n p=~.1]
@@ -1639,6 +2672,21 @@ Produces a `++json` number from an unsigned atom.
1640Escape JSON character
2673Escape JSON character
2675+Produces a [`++tape`]() of an escaped [`++json`](/doc/hoon/library/3bi#++json) character `a`.
2680+`a` is an atom of odor [`@tD`](), aka a [`++char`]().
1643 |= a=@ ^- tape
2691 |= a=@ ^- tape
1644 ?+ a [a ~]
2692 ?+ a [a ~]
@@ -1648,9 +2696,8 @@ Escape JSON character
1651−Produces a `++tape` of an escaped [`++json`](/doc/hoon/library/3bi#++json) character `a`.
2699+Examples
1655 ~zod/try=> (jesc 'a')
2702 ~zod/try=> (jesc 'a')
@@ -1661,7 +2708,7 @@ Produces a `++tape` of an escaped [`++json`](/doc/hoon/library/3bi#++json) chara
1661 ~zod/try=> (jesc '"')
2708 ~zod/try=> (jesc '"')
1664−### `++scanf`
2711+### `++scanf` XX
1666Formatted scan
2713Formatted scan
@@ -1693,7 +2740,7 @@ collapses the result list to a tuple, such that (scanf "foo 1 2 bar"
1693 ~zod/try=> `@da`(year `date`dat(- [%& -.dat], |6 ~[(div (mul |6.dat (bex 16)) 1.000)]))
2740 ~zod/try=> `@da`(year `date`dat(- [%& -.dat], |6 ~[(div (mul |6.dat (bex 16)) 1.000)]))
1694 ~2014.8.12..23.10.58..ee56
2741 ~2014.8.12..23.10.58..ee56
1696−### `++parsf`
2743+### `++parsf` XX
1698 ++ parsf :: make parser from:
2745 ++ parsf :: make parser from:
1699 |^ |* a=(pole ,_:/(*$&(_rule tape))) :: ;"chars{rule}chars"
2746 |^ |* a=(pole ,_:/(*$&(_rule tape))) :: ;"chars{rule}chars"
@@ -1710,7 +2757,7 @@ the embedded rules' results.
1711Two intermediate arms are used:
2758Two intermediate arms are used:
1713−#### ++norm
2760+#### ++norm XX
1715 :: .= (norm [;"{n}, {n}"]:n=dim:ag) ~[[& dim] [| ", "] [& dim]]:ag
2762 :: .= (norm [;"{n}, {n}"]:n=dim:ag) ~[[& dim] [| ", "] [& dim]]:ag
1716 ++ norm
2763 ++ norm
@@ -1729,7 +2776,7 @@ Two intermediate arms are used:
1729`norm` converts a `;"` pole of `[[%~. [%~. ?(tape _rule)] ~] ~]` into a
2776`norm` converts a `;"` pole of `[[%~. [%~. ?(tape _rule)] ~] ~]` into a
1730more convenient list of discriminated tapes and rules.
2777more convenient list of discriminated tapes and rules.
1732−#### ++bill
2779+#### ++bill XX
1734 :: .= (bill ~[[& dim] [| ", "] [& dim]]:ag)
2781 :: .= (bill ~[[& dim] [| ", "] [& dim]]:ag)
1735 :: ;~(plug dim ;~(pfix com ace ;~(plug dim (easy)))):ag
2782 :: ;~(plug dim ;~(pfix com ace ;~(plug dim (easy)))):ag
@@ -1747,12 +2794,24 @@ sections and producing a list of the rules' results.
1748### `++taco`
2795### `++taco`
2797+Converts an atom to an octet stream [`++octs`](), which contains a length, to
2798+encode trailing zeroes.
1750 ++ taco :: atom to octstream
2808 ++ taco :: atom to octstream
1751 |= tam=@ ^- octs
2809 |= tam=@ ^- octs
1752 [(met 3 tam) tam]
2810 [(met 3 tam) tam]
1755−An [octs] contains a length, to encode trailing zeroes.
2813+Examples
1757 ~zod/try=> (taco 'abc')
2816 ~zod/try=> (taco 'abc')
1758 [p=3 q=6.513.249]
2817 [p=3 q=6.513.249]
@@ -1761,12 +2820,31 @@ An [octs] contains a length, to encode trailing zeroes.
1762### `++tact`
2821### `++tact`
2825+Converts a `++tape` to an octet stream ([`++octs`](), which contains a length
2826+to encode trailing zeroes.
1764 ++ tact :: tape to octstream
2841 ++ tact :: tape to octstream
1765 |= tep=tape ^- octs
2842 |= tep=tape ^- octs
1766 (taco (rap 3 tep))
2843 (taco (rap 3 tep))
1769−octs from tape
2846+Examples
1771 ~zod/try=> (tact "abc")
2849 ~zod/try=> (tact "abc")
1772 [p=3 q=6.513.249]
2850 [p=3 q=6.513.249]
@@ -1775,13 +2853,32 @@ octs from tape
1776### `++tell`
2854### `++tell`
2858+Converts a [`++wall`]() to an octet stream ([`++octs`](), which contains a length
2859+to encode trailing zeroes.
2864+`wol` is a [`++wall`]().
1778 ++ tell :: wall to octstream
2874 ++ tell :: wall to octstream
1779 |= wol=wall ^- octs
2875 |= wol=wall ^- octs
1780 =+ buf=(rap 3 (turn wol |=(a=tape (crip (weld a `tape`[`@`10 ~])))))
2876 =+ buf=(rap 3 (turn wol |=(a=tape (crip (weld a `tape`[`@`10 ~])))))
1781 [(met 3 buf) buf]
2877 [(met 3 buf) buf]
1784−octs from wall
2880+Examples
1786 ~zod/try=> (tell ~["abc" "line" "3"])
2883 ~zod/try=> (tell ~["abc" "line" "3"])
1787 [p=11 q=12.330.290.663.108.538.769.039.969]
2884 [p=11 q=12.330.290.663.108.538.769.039.969]
@@ -1794,14 +2891,32 @@ octs from wall
1795### `++txml`
2892### `++txml`
2894+Tape to xml CDATA node
2896+Converts a [`++tape`]() to an xml CDATA node XX
2901+`tep` is a [`++tape`]().
1797 ++ txml :: string to xml
2911 ++ txml :: string to xml
1798 |= tep=tape ^- manx
2912 |= tep=tape ^- manx
1799 [[%$ [%$ tep] ~] ~]
2913 [[%$ [%$ tep] ~] ~]
1802−Tape to xml CDATA node
2916+Examples
1804 ~zod/try=> (txml "hi")
2919 ~zod/try=> (txml "hi")
1805 [g=[n=%$ a=~[[n=%$ v="hi"]]] c=~]
2920 [g=[n=%$ a=~[[n=%$ v="hi"]]] c=~]
1806 ~zod/try=> (txml "larton bestok")
2921 ~zod/try=> (txml "larton bestok")
1807− [g=[n=%$ a=~[[n=%$ v="larton bestok"]]] c=~]
2922+ [