on master help sign in
Update 2q
767e754rmariani
docs/hoon/library/2q.md+28−7
@@ -20,8 +20,8 @@ consume `tape`s, which are lists of `char`.
20
20
21 > *char
21 > *char
22 ''
22 ''
23−
23+
24− > (char 97)
24+ > `@tD`97
25 'a'
25 'a'
26
26
27
27
@@ -41,16 +41,19 @@ atom of UTF-8 text.
41#### Examples
41#### Examples
42
42
43
43
44+ > *cord
45+ ''
46+
44 > `@ux`'foobar'
47 > `@ux`'foobar'
45 0x7261.626f.6f66
48 0x7261.626f.6f66
46
49
47− > (cord 97)
50+ > `@t`97
48 'a'
51 'a'
49
52
50 > `@`'urbit'
53 > `@`'urbit'
51 499.984.265.845
54 499.984.265.845
52
55
53− > (cord 499.984.265.845)
56+ > `@t`499.984.265.845
54 'urbit'
57 'urbit'
55
58
56
59
@@ -79,6 +82,9 @@ which is a day atom and a time.
79
82
80#### Examples
83#### Examples
81
84
85+ > *date
86+ [[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]]
87+
82 > `date`(yore ~2014.6.6..21.09.15..0a16)
88 > `date`(yore ~2014.6.6..21.09.15..0a16)
83 [[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
89 [[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
84
90
@@ -104,11 +110,13 @@ An atom type that only permits ASCII characters.
104
110
105#### Examples
111#### Examples
106
112
107− > (knot 105)
113+ > *knot
114+ ~.
115+
116+ > `@ta`105
108 ~.i
117 ~.i
109
118
110
119
111−
112***
120***
113### `++tang`
121### `++tang`
114
122
@@ -123,6 +131,9 @@ traces.
123
131
124#### Examples
132#### Examples
125
133
134+ > *tang
135+ ~
136+
126 > (~(win re [%palm ["1" "2" "3" "4"] [%leaf "foobar"] [%leaf "bazbud"] [%leaf "zzzzzzqaaa"] ~]) 0 50)
137 > (~(win re [%palm ["1" "2" "3" "4"] [%leaf "foobar"] [%leaf "bazbud"] [%leaf "zzzzzzqaaa"] ~]) 0 50)
127 <<"23foobar1bazbud1zzzzzzqaaa4">>
138 <<"23foobar1bazbud1zzzzzzqaaa4">>
128
139
@@ -162,6 +173,8 @@ without back-steps at new lines.
162
173
163#### Examples
174#### Examples
164
175
176+ > *tank
177+ [%rose p=[p="" q="" r=""] q=~]
165
178
166 > (wash [0 80] >(bex 20) (bex 19)<) :: at 80 cols
179 > (wash [0 80] >(bex 20) (bex 19)<) :: at 80 cols
167 <<"[1.048.576 524.288]">>
180 <<"[1.048.576 524.288]">>
@@ -201,6 +214,9 @@ One of Hoon's two string types, the other being `++cord`. A tape is a list of
201
214
202#### Examples
215#### Examples
203
216
217+ > *tape
218+ ""
219+
204 > `tape`"foobar"
220 > `tape`"foobar"
205 "foobar"
221 "foobar"
206
222
@@ -290,6 +306,9 @@ A list of `cord`s. A `wain` is used instead of a single `cord` with `\n`.
290
306
291#### Examples
307#### Examples
292
308
309+ > *wain
310+ <||>
311+
293 > `wain`/som/del/rok
312 > `wain`/som/del/rok
294 <|som del rok|>
313 <|som del rok|>
295
314
@@ -307,7 +326,9 @@ A list of `tape`s. `wall` is used instead of a single `tape` with `\n`.
307
326
308#### Examples
327#### Examples
309
328
310−
329+ > *wall
330+ <<>>
331+
311 > `wall`(wash [0 20] leaf+<(bex 256)>)
332 > `wall`(wash [0 20] leaf+<(bex 256)>)
312 <<
333 <<
313 "\\/115.792.089.237.\\/"
334 "\\/115.792.089.237.\\/"