on master help sign in
thru 20
00b73d8Henry Ault
docs/system/hoon/library/src/2n/gate/cork.md+3−2
@@ -9,14 +9,15 @@ Build `f` such that `(f x) .= (b (a x))`.
9Source
9Source
10------
10------
11
11
12− ++ cork |*([a=_,* b=gate] (corl b a)) :: compose forward
12+ ++ cork |*({a/_|=(* **) b/gate} (corl b a)) :: compose forward
13+
13
14
14Examples
15Examples
15--------
16--------
16
17
17 ~zod/try=> (:(cork dec dec dec) 20)
18 ~zod/try=> (:(cork dec dec dec) 20)
18 17
19 17
19− ~zod/try=> =mal (mo (limo a/15 b/23 ~))
20+ ~zod/try=> =mal (mo (limo a+15 b+23 ~))
20 ~zod/try=> ((cork ~(got by mal) dec) %a)
21 ~zod/try=> ((cork ~(got by mal) dec) %a)
21 14
22 14
22 ~zod/try=> ((cork ~(got by mal) dec) %b)
23 ~zod/try=> ((cork ~(got by mal) dec) %b)
docs/system/hoon/library/src/2n/gate/corl.md+4−2
@@ -12,9 +12,11 @@ Source
12------
12------
13
13
14 ++ corl :: compose backwards
14 ++ corl :: compose backwards
15− |* [a=gate b=_,*]
15+ |* {a/gate b/_|=(* **)}
16+ =< +:|.((a (b))) :: span check
16− |= c=_+<.b
17+ |* c/_+<.b
17 (a (b c))
18 (a (b c))
19+ ::
18
20
19Examples
21Examples
20--------
22--------
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
7Accepts
7Accepts
8-------
8-------
9
9
10−`a` is a [gate]().
10+`a` is a gate.
11
11
12−`c` is a [noun]().
12+`c` is a noun.
13
13
14Produces
14Produces
15--------
15--------
@@ -18,10 +18,11 @@ Produces
18Source
18Source
19------
19------
20
20
21− ++ curr
21+ ++ curr :: curry right
22− |* [a=_|=(^ _*) c=*]
22+ |* {a/_|=(^ **) c/*}
23− |* b=_+<+.a
23+ |* b/_+<+.a
24 (a b c)
24 (a b c)
25+ ::
25
26
26Examples
27Examples
27--------
28--------
docs/system/hoon/library/src/2n/gate/cury.md+8−6
@@ -5,22 +5,24 @@ Curry a gate, binding the head of its sample
5Accepts
5Accepts
6-------
6-------
7
7
8−`a` is a [gate]().
8+`a` is a gate.
9
9
10−`b` is a [noun]().
10+`b` is a noun.
11
11
12Produces
12Produces
13--------
13--------
14
14
15−A [gate]().
15+A gate.
16
16
17Source
17Source
18------
18------
19
19
20− ++ cury
20+ ++ cury :: curry left
21− |* [a=_|=(^ _*) b=*]
21+ |* {a/_|=(^ **) b/*}
22− |* c=_+<+.a
22+ |* c/_+<+.a
23 (a b c)
23 (a b c)
24+ ::
25+
24
26
25Examples
27Examples
26--------
28--------
docs/system/hoon/library/src/2n/gate/hard.md+7−8
@@ -6,21 +6,20 @@ not.
6Source
6Source
7------
7------
8
8
9− ++ hard
9+ ++ cury :: curry left
10− |* han=$+(* *)
10+ |* {a/_|=(^ **) b/*}
11− |= fud=* ^- han
11+ |* c/_+<+.a
12− ~| %hard
12+ (a b c)
13− =+ gol=(han fud)
13+ ::
14− ?>(=(gol fud) gol)
15
14
16Examples
15Examples
17--------
16--------
18
17
19 ~zod/try=> ((hard (list)) (limo [1 2 3 ~]))
18 ~zod/try=> ((hard (list)) (limo [1 2 3 ~]))
20 ~[1 2 3]
19 ~[1 2 3]
21− ~zod/try=> ((hard ,@) (add 2 2))
20+ ~zod/try=> ((hard @) (add 2 2))
22 4
21 4
23− ~zod/try=> ((hard ,@t) (crip "Tape to cord, bro!"))
22+ ~zod/try=> ((hard @t) (crip "Tape to cord, bro!"))
24 'Tape to cord, bro'
23 'Tape to cord, bro'
25 ~zod/try=> ((hard tape) (crip "...Tape to cord, bro?..."))
24 ~zod/try=> ((hard tape) (crip "...Tape to cord, bro?..."))
26 ! hard
25 ! hard
docs/system/hoon/library/src/2n/gate/soft.md+9−8
@@ -6,24 +6,25 @@ is not.
6Source
6Source
7------
7------
8
8
9− ++ soft
9+ ++ soft :: maybe coerce to span
10− |* han=$+(* *)
10+ |* han/$-(* *)
11− |= fud=* ^- (unit han)
11+ |= fud/* ^- (unit han)
12 =+ gol=(han fud)
12 =+ gol=(han fud)
13 ?.(=(gol fud) ~ [~ gol])
13 ?.(=(gol fud) ~ [~ gol])
14+ ::
14
15
15Examples
16Examples
16--------
17--------
17
18
18− ~zod/try=> ((soft ,%4) (add 2 2))
19+ ~zod/try=> ((soft %4) (add 2 2))
19 [~ %4]
20 [~ %4]
20− ~zod/try=> ((soft ,@) (add 2 2))
21+ ~zod/try=> ((soft @) (add 2 2))
21 [~ 4]
22 [~ 4]
22− ~zod/try=> ((soft ,%5) (add 2 2))
23+ ~zod/try=> ((soft %5) (add 2 2))
23 ~
24 ~
24− ~zod/try=> ((soft ,@t) (crip "Tape to cord, Woohoo!"))
25+ ~zod/try=> ((soft @t) (crip "Tape to cord, Woohoo!"))
25 [~ 'Tape to cord, Woohoo!']
26 [~ '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?!'))
27 ~
28 ~
28
29
29
30
docs/system/hoon/library/src/2o/mold/jar.md+4−3
@@ -1,17 +1,18 @@
1### `++jar`
1### `++jar`
2
2
3
3
4−Tile generator. A [`++jar`]() is a [`++map`]() of [`++list`]().
4+Tile generator. A `++jar` is a `++map` of `++list`.
5
5
6Source
6Source
7------
7------
8
8
9− ++ jar |*([a=_,* b=_,*] (map a (list b))) :: map of lists
9+ ++ jar |*({a/$-(* *) b/$-(* *)} (map a (list b))) :: map of lists
10+
10
11
11Examples
12Examples
12--------
13--------
13
14
14−See also: [`++ja`](), [`++by`](), [`++map`](), [`++list`]()
15+See also: `++ja`, `++by`, `++map`, `++list`
15
16
16 ~zod/try=> =a (limo [1 2 ~])
17 ~zod/try=> =a (limo [1 2 ~])
17 ~zod/try=> a
18 ~zod/try=> a
docs/system/hoon/library/src/2o/mold/jug.md+3−2
@@ -1,11 +1,12 @@
1### `++jug`
1### `++jug`
2
2
3−[mold]() generator. A `++jug` is a [`++map`]() of [`++set`]()s.
3+mold generator. A `++jug` is a `++map` of `++set`s.
4
4
5Source
5Source
6------
6------
7
7
8− ++ jug |*([a=_,* b=_,*] (map a (set b))) :: map of sets
8+ ++ jug |*({a/$-(* *) b/$-(* *)} (map a (set b))) :: map of sets
9+
9
10
10Examples
11Examples
11--------
12--------
docs/system/hoon/library/src/2o/mold/map.md+12−11
@@ -2,26 +2,27 @@
2
2
3Map
3Map
4
4
5−[mold]() generator. A `++map` is a [treap](http://en.wikipedia.org/wiki/Treap) of
5+mold generator. A `++map` is a treap of
6−key, value pairs.
6+key-value pairs.
7
7
8
8
9Source
9Source
10------
10------
11
11
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+
13
15
14Examples
16Examples
15--------
17--------
16
18
17−See also: [`++by`]()
19+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−
25
20
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+
26
27
27***
28***
docs/system/hoon/library/src/2o/mold/qeu.md+3−4
@@ -2,16 +2,15 @@
2
2
3Queue
3Queue
4
4
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
6items.
6items.
7
7
8Source
8Source
9------
9------
10
10
11− ++ qeu |* a=_,* :: queue
11+ ++ qeu |* a/$-(* *) :: queue
12− $|(~ [n=a l=(qeu a) r=(qeu a)]) ::
12+ $@($~ {n/a l/(qeu a) r/(qeu a)}) ::
13
13
14−See also: [`++to`]()
15
14
16Examples
15Examples
17--------
16--------
docs/system/hoon/library/src/2o/mold/set.md+5−5
@@ -2,19 +2,19 @@
2
2
3Set
3Set
4
4
5−[mold]() generator. A `++set` is a
5+mold generator. A `++set` is a treap with unique values.
6−[treap](http://en.wikipedia.org/wiki/Treap) with unique values.
7
6
8Source
7Source
9------
8------
10
9
11− ++ set |* a=_,* :: set
10+ ++ set |* a/$-(* *) :: set
12− $|(~ [n=a l=(set a) r=(set a)]) ::
11+ $@($~ {n/a l/(set a) r/(set a)}) ::
12+
13
13
14Examples
14Examples
15--------
15--------
16
16
17−See also: [`++in`]()
17+See also: `++in`
18
18
19 ~zod/try=> (sa "abc")
19 ~zod/try=> (sa "abc")
20 {~~a ~~c ~~b}
20 {~~a ~~c ~~b}