@@ -4,12 +4,13 @@ Map operations
5 ++ by :: map engine
5 ++ by :: map engine
7− |/ a=(map)
7+ |_ a/(map)
9Container arm for map operation arms. A map is a set of key, value
10Container arm for map operation arms. A map is a set of key, value
10−pairs. The contained arms inherit it's [sample]() [map](), `a`.
11+pairs. The contained arms inherit it's sample map, `a`.
12−`a` is a [map]().
13+`a` is a map.
14 ~zod/try=> ~(. by (mo (limo [%a 1] [%b 2] ~)))
15 ~zod/try=> ~(. by (mo (limo [%a 1] [%b 2] ~)))
15 <19.irb [nlr([p={%a %b} q=@ud]) <414.rvm 101.jzo 1.ypj %164>]>
16 <19.irb [nlr([p={%a %b} q=@ud]) <414.rvm 101.jzo 1.ypj %164>]>
@@ -22,26 +23,28 @@ Logical AND
23 +- all :: logical AND
24 +- all :: logical AND
25− |* b=$+(* ?)
26+ |* b/$-(* ?)
29 ?&((b q.n.a) $(a l.a) $(a r.a))
30 ?&((b q.n.a) $(a l.a) $(a r.a))
31Computes the logical AND on the results of slamming every element in map
34Computes the logical AND on the results of slamming every element in map
32`a` with gate `b`. Produces a loobean.
35`a` with gate `b`. Produces a loobean.
34−`a` is a [map]().
37+`a` is a map.
36−`b` is a [wet gate]().
39+`b` is a wet gate.
38− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
41+ ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
39− ~zod/try=> (~(all by b) |=(a=* ?@(a & |)))
42+ ~zod/try=> (~(all by b) |=(a/* ?@(a & |)))
41 ~zod/try=> =a (mo `(list ,[@t @u])`[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
44 ~zod/try=> =a (mo `(list ,[@t @u])`[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
42− ~zod/try=> (~(all by a) |=(a=@ (lte a 6)))
45+ ~zod/try=> (~(all by a) |=(a/@ (lte a 6)))
44− ~zod/try=> (~(all by a) |=(a=@ (lte a 4)))
47+ ~zod/try=> (~(all by a) |=(a/@ (lte a 4)))
47------------------------------------------------------------------------
50------------------------------------------------------------------------
@@ -61,14 +64,14 @@ Logical OR
61Computes the logical OR on the results of slamming every element with
64Computes the logical OR on the results of slamming every element with
62gate `b`. Produces a loobean.
65gate `b`. Produces a loobean.
64−`a` is a [map]().
67+`a` is a map.
66−`b` is a [wet gate]().
69+`b` is a wet gate.
68− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
71+ ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
69 ~zod/try=> (~(all by b) |=(a=* ?@(a & |)))
72 ~zod/try=> (~(all by b) |=(a=* ?@(a & |)))
71− ~zod/try=> =a (mo `(list ,[@t @u])`[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
74+ ~zod/try=> =a (mo `(list [@t @u])`[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
72 ~zod/try=> (~(any by a) |=(a=@ (lte a 4)))
75 ~zod/try=> (~(any by a) |=(a=@ (lte a 4)))
@@ -80,7 +83,7 @@ Delete
81 +- del :: delete at key b
84 +- del :: delete at key b
@@ -88,20 +91,21 @@ Delete
88 ?: (gor b p.n.a)
91 ?: (gor b p.n.a)
89 [n.a $(a l.a) r.a]
92 [n.a $(a l.a) r.a]
90 [n.a l.a $(a r.a)]
93 [n.a l.a $(a r.a)]
91− |- ^- ?(~ _a)
94+ |- ^- {$?($~ _a)}
92 ?~ l.a r.a
95 ?~ l.a r.a
93 ?~ r.a l.a
96 ?~ r.a l.a
94 ?: (vor p.n.l.a p.n.r.a)
97 ?: (vor p.n.l.a p.n.r.a)
95 [n.l.a l.l.a $(l.a r.l.a)]
98 [n.l.a l.l.a $(l.a r.l.a)]
96 [n.r.a $(r.a l.r.a) r.r.a]
99 [n.r.a $(r.a l.r.a) r.r.a]
98Produces map `a` with the element located at key `b` removed.
102Produces map `a` with the element located at key `b` removed.
100−`a` is a [map]().
104+`a` is a map.
102−`b` is a key as a [noun]().
106+`b` is a key as a noun.
104− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
108+ ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
105 ~zod/try=> (~(del by b) `a`)
109 ~zod/try=> (~(del by b) `a`)
106 {[p=`b` q=[2 3]]}
110 {[p=`b` q=[2 3]]}
@@ -111,23 +115,25 @@ Produces map `a` with the element located at key `b` removed.
112Axis of key
116Axis of key
114− +- dig :: axis of key
118+ +- dig :: axis of b key
117− |- ^- (unit ,@)
121+ |- ^- (unit @)
119 ?: =(b p.n.a) [~ u=(peg c 2)]
123 ?: =(b p.n.a) [~ u=(peg c 2)]
120 ?: (gor b p.n.a)
124 ?: (gor b p.n.a)
121 $(a l.a, c (peg c 6))
125 $(a l.a, c (peg c 6))
122 $(a r.a, c (peg c 7))
126 $(a r.a, c (peg c 7))
124Produce the axis of key `b` within map `a`.
130Produce the axis of key `b` within map `a`.
126−`a` is a [map]().
132+`a` is a map.
128−`b` is a key as a [noun]().
134+`b` is a key as a noun.
130− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
136+ ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
131 ~zod/try=> (~(dig by b) `b`)
137 ~zod/try=> (~(dig by b) `b`)