on master help sign in
thru 20
commit00b73d8e316591be8884baed68f32d5ff526b998 authorHenry Ault <henry@tlon.io> dateThu 17 Mar 2016, 13:09 (11 years ago) parent64804f3
11 files changed+64−56
docs/system/hoon/library/src/2n/gate/cork.md+3−2 docs/system/hoon/library/src/2n/gate/corl.md+4−2 docs/system/hoon/library/src/2n/gate/curr.md+6−5 docs/system/hoon/library/src/2n/gate/cury.md+8−6 docs/system/hoon/library/src/2n/gate/hard.md+7−8 docs/system/hoon/library/src/2n/gate/soft.md+9−8 docs/system/hoon/library/src/2o/mold/jar.md+4−3 docs/system/hoon/library/src/2o/mold/jug.md+3−2 docs/system/hoon/library/src/2o/mold/map.md+12−11 docs/system/hoon/library/src/2o/mold/qeu.md+3−4 docs/system/hoon/library/src/2o/mold/set.md+5−5
docs/system/hoon/library/src/2n/gate/cork.md+3−2
@@ -9,14 +9,15 @@ Build `f` such that `(f x) .= (b (a x))`.
99Source
1010------
1111
12− ++ cork |*([a=_,* b=gate] (corl b a)) :: compose forward
12+ ++ cork |*({a/_|=(* **) b/gate} (corl b a)) :: compose forward
13+
1314
1415Examples
1516--------
1617
1718 ~zod/try=> (:(cork dec dec dec) 20)
1819 17
19− ~zod/try=> =mal (mo (limo a/15 b/23 ~))
20+ ~zod/try=> =mal (mo (limo a+15 b+23 ~))
2021 ~zod/try=> ((cork ~(got by mal) dec) %a)
2122 14
2223 ~zod/try=> ((cork ~(got by mal) dec) %b)
docs/system/hoon/library/src/2n/gate/corl.md+4−2
@@ -12,9 +12,11 @@ Source
1212------
1313
1414 ++ corl :: compose backwards
15− |* [a=gate b=_,*]
16− |= c=_+<.b
15+ |* {a/gate b/_|=(* **)}
16+ =< +:|.((a (b))) :: span check
17+ |* c/_+<.b
1718 (a (b c))
19+ ::
1820
1921Examples
2022--------
docs/system/hoon/library/src/2n/gate/curr.md+6−5
@@ -7,9 +7,9 @@ Right curry a gate, binding the tail of its sample
77Accepts
88-------
99
10−`a` is a [gate]().
10+`a` is a gate.
1111
12−`c` is a [noun]().
12+`c` is a noun.
1313
1414Produces
1515--------
@@ -18,10 +18,11 @@ Produces
1818Source
1919------
2020
21− ++ curr
22− |* [a=_|=(^ _*) c=*]
23− |* b=_+<+.a
21+ ++ curr :: curry right
22+ |* {a/_|=(^ **) c/*}
23+ |* b/_+<+.a
2424 (a b c)
25+ ::
2526
2627Examples
2728--------
docs/system/hoon/library/src/2n/gate/cury.md+8−6
@@ -5,22 +5,24 @@ Curry a gate, binding the head of its sample
55Accepts
66-------
77
8−`a` is a [gate]().
8+`a` is a gate.
99
10−`b` is a [noun]().
10+`b` is a noun.
1111
1212Produces
1313--------
1414
15−A [gate]().
15+A gate.
1616
1717Source
1818------
1919
20− ++ cury
21− |* [a=_|=(^ _*) b=*]
22− |* c=_+<+.a
20+ ++ cury :: curry left
21+ |* {a/_|=(^ **) b/*}
22+ |* c/_+<+.a
2323 (a b c)
24+ ::
25+
2426
2527Examples
2628--------
docs/system/hoon/library/src/2n/gate/hard.md+7−8
@@ -6,21 +6,20 @@ not.
66Source
77------
88
9− ++ hard
10− |* han=$+(* *)
11− |= fud=* ^- han
12− ~| %hard
13− =+ gol=(han fud)
14− ?>(=(gol fud) gol)
9+ ++ cury :: curry left
10+ |* {a/_|=(^ **) b/*}
11+ |* c/_+<+.a
12+ (a b c)
13+ ::
1514
1615Examples
1716--------
1817
1918 ~zod/try=> ((hard (list)) (limo [1 2 3 ~]))
2019 ~[1 2 3]
21− ~zod/try=> ((hard ,@) (add 2 2))
20+ ~zod/try=> ((hard @) (add 2 2))
2221 4
23− ~zod/try=> ((hard ,@t) (crip "Tape to cord, bro!"))
22+ ~zod/try=> ((hard @t) (crip "Tape to cord, bro!"))
2423 'Tape to cord, bro'
2524 ~zod/try=> ((hard tape) (crip "...Tape to cord, bro?..."))
2625 ! hard
docs/system/hoon/library/src/2n/gate/soft.md+9−8
@@ -6,24 +6,25 @@ is not.
66Source
77------
88
9− ++ soft
10− |* han=$+(* *)
11− |= fud=* ^- (unit han)
9+ ++ soft :: maybe coerce to span
10+ |* han/$-(* *)
11+ |= fud/* ^- (unit han)
1212 =+ gol=(han fud)
1313 ?.(=(gol fud) ~ [~ gol])
14+ ::
1415
1516Examples
1617--------
1718
18− ~zod/try=> ((soft ,%4) (add 2 2))
19+ ~zod/try=> ((soft %4) (add 2 2))
1920 [~ %4]
20− ~zod/try=> ((soft ,@) (add 2 2))
21+ ~zod/try=> ((soft @) (add 2 2))
2122 [~ 4]
22− ~zod/try=> ((soft ,%5) (add 2 2))
23+ ~zod/try=> ((soft %5) (add 2 2))
2324 ~
24− ~zod/try=> ((soft ,@t) (crip "Tape to cord, Woohoo!"))
25+ ~zod/try=> ((soft @t) (crip "Tape to cord, Woohoo!"))
2526 [~ 'Tape to cord, Woohoo!']
26− ~zod/try=> ((soft ,@t) (trip 'Cmon man... Tape to cord? Please?!'))
27+ ~zod/try=> ((soft @t) (trip 'Cmon man... Tape to cord? Please?!'))
2728 ~
2829
2930
docs/system/hoon/library/src/2o/mold/jar.md+4−3
@@ -1,17 +1,18 @@
11### `++jar`
22
33
4−Tile generator. A [`++jar`]() is a [`++map`]() of [`++list`]().
4+Tile generator. A `++jar` is a `++map` of `++list`.
55
66Source
77------
88
9− ++ jar |*([a=_,* b=_,*] (map a (list b))) :: map of lists
9+ ++ jar |*({a/$-(* *) b/$-(* *)} (map a (list b))) :: map of lists
10+
1011
1112Examples
1213--------
1314
14−See also: [`++ja`](), [`++by`](), [`++map`](), [`++list`]()
15+See also: `++ja`, `++by`, `++map`, `++list`
1516
1617 ~zod/try=> =a (limo [1 2 ~])
1718 ~zod/try=> a
docs/system/hoon/library/src/2o/mold/jug.md+3−2
@@ -1,11 +1,12 @@
11### `++jug`
22
3−[mold]() generator. A `++jug` is a [`++map`]() of [`++set`]()s.
3+mold generator. A `++jug` is a `++map` of `++set`s.
44
55Source
66------
77
8− ++ jug |*([a=_,* b=_,*] (map a (set b))) :: map of sets
8+ ++ jug |*({a/$-(* *) b/$-(* *)} (map a (set b))) :: map of sets
9+
910
1011Examples
1112--------
docs/system/hoon/library/src/2o/mold/map.md+12−11
@@ -2,26 +2,27 @@
22
33Map
44
5−[mold]() generator. A `++map` is a [treap](http://en.wikipedia.org/wiki/Treap) of
6−key, value pairs.
5+mold generator. A `++map` is a treap of
6+key-value pairs.
77
88
99Source
1010------
1111
12− ++ map |* [a=_,* b=_,*] :: associative tree
12+ ++ map |* {a/$-(* *) b/$-(* *)} :: associative tree
13+ $@($~ {n/{p/a q/b} l/(map a b) r/(map a b)}) ::
14+
1315
1416Examples
1517--------
1618
17−See also: [`++by`]()
18−
19− ~zod/try=> :type; *(map ,@t ,@u)
20− {}
21− nlr([p=@t q=@u])
22− ~zod/try=> `(map ,@ta ,@ud)`(mo (limo a/1 b/2 ~))
23− {[p=~.a q=1] [p=~.b q=2]}
24−
19+See also: `++by`
2520
21+ ~zod/try=>? *(map @t @u)
22+ nlr({p/@t q/@u})
23+ {}
24+ ~zod/try=> (molt `(list (pair * *))`[[a+1 b+2] ~])
25+ {[p=[97 1] q=[98 2]]}
26+
2627
2728***
docs/system/hoon/library/src/2o/mold/qeu.md+3−4
@@ -2,16 +2,15 @@
22
33Queue
44
5−[mold]() generator. An ordered [treap](http://en.wikipedia.org/wiki/Treap) of
5+mold generator. An ordered [treap](http://en.wikipedia.org/wiki/Treap) of
66items.
77
88Source
99------
1010
11− ++ qeu |* a=_,* :: queue
12− $|(~ [n=a l=(qeu a) r=(qeu a)]) ::
11+ ++ qeu |* a/$-(* *) :: queue
12+ $@($~ {n/a l/(qeu a) r/(qeu a)}) ::
1313
14−See also: [`++to`]()
1514
1615Examples
1716--------
docs/system/hoon/library/src/2o/mold/set.md+5−5
@@ -2,19 +2,19 @@
22
33Set
44
5−[mold]() generator. A `++set` is a
6−[treap](http://en.wikipedia.org/wiki/Treap) with unique values.
5+mold generator. A `++set` is a treap with unique values.
76
87Source
98------
109
11− ++ set |* a=_,* :: set
12− $|(~ [n=a l=(set a) r=(set a)]) ::
10+ ++ set |* a/$-(* *) :: set
11+ $@($~ {n/a l/(set a) r/(set a)}) ::
12+
1313
1414Examples
1515--------
1616
17−See also: [`++in`]()
17+See also: `++in`
1818
1919 ~zod/try=> (sa "abc")
2020 {~~a ~~c ~~b}