@@ -38,10 +38,10 @@ Computes the logical AND on the results of slamming every element in map
3838
3939`b` is a wet gate.
4040
41− ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
41+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
4242 ~zod/try=> (~(all by b) |=(a/* ?@(a & |)))
4343 %.n
44− ~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] ~])
4545 ~zod/try=> (~(all by a) |=(a/@ (lte a 6)))
4646 %.y
4747 ~zod/try=> (~(all by a) |=(a/@ (lte a 4)))
@@ -68,10 +68,10 @@ gate `b`. Produces a loobean.
6868
6969`b` is a wet gate.
7070
71− ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
72− ~zod/try=> (~(all by b) |=(a=* ?@(a & |)))
71+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
72+ ~zod/try=> (~(all by b) |=(a/* ?@(a & |)))
7373 %.y
74− ~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] ~])
7575 ~zod/try=> (~(any by a) |=(a=@ (lte a 4)))
7676 %.y
7777
@@ -105,7 +105,7 @@ Produces map `a` with the element located at key `b` removed.
105105
106106`b` is a key as a noun.
107107
108− ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
108+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
109109 ~zod/try=> (~(del by b) `a`)
110110 {[p=`b` q=[2 3]]}
111111
@@ -133,7 +133,7 @@ Produce the axis of key `b` within map `a`.
133133
134134`b` is a key as a noun.
135135
136− ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
136+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
137137 ~zod/try=> (~(dig by b) `b`)
138138 [~ 2]
139139
@@ -145,21 +145,22 @@ Concatenate
145145
146146 +- gas :: concatenate
147147 ~/ %gas
148− |* b=(list ,[p=* q=*])
149− => .(b `(list ,_?>(?=(^ a) n.a))`b)
148+ |= b/(list _?>(?=(^ a) n.a))
150149 |- ^+ a
151150 ?~ b
152151 a
153− $(b t.b, a (put(+< a) p.i.b q.i.b))
152+ $(b t.b, a (put i.b))
153+ ::
154+
154155
155156Insert a list of key-value pairs `b` into map `a`.
156157
157−`a` is a [map]().
158+`a` is a map.
158159
159−`b` is a [list]() of [cells]() of key-value nouns `p` and `q`.
160+`b` is a list of cells of key-value nouns `p` and `q`.
160161
161− ~zod/try=> =a (mo `(list ,[@t *])`[[`a` 1] [`b` 2] ~])
162− ~zod/try=> =b `(list ,[@t *])`[[`c` 3] [`d` 4] ~]
162+ ~zod/try=> =a (mo `(list {@t *})`[[`a` 1] [`b` 2] ~])
163+ ~zod/try=> =b `(list {@t *})`[[`c` 3] [`d` 4] ~]
163164 ~zod/try=> (~(gas by a) b)
164165 {[p=`d` q=4] [p=`a` q=1] [p=`c` q=3] [p=`b` q=2]}
165166
@@ -183,11 +184,11 @@ Grab unit value
183184
184185Produce the unit value of the value located at key `b` within map `a`.
185186
186−`a` is a [map]()
187+`a` is a map
187188
188−`b` is a [key]() as a [noun]()
189+`b` is a key as a noun
189190
190− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
191+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
191192 ~zod/try=> (~(get by b) `b`)
192193 [~ [2 3]]
193194
@@ -198,18 +199,17 @@ Produce the unit value of the value located at key `b` within map `a`.
198199Assert
199200
200201 +- got
201− |* b=*
202− %- need
203− %- get(+< a) b
202+ |* b/*
203+ (need (get b))
204204
205205Produce the value located at key `b` within map `a`. Crash if key `b`
206206does not exist.
207207
208−`a` is a [map]().
208+`a` is a map.
209209
210−`b` is a [key]().
210+`b` is a key.
211211
212− ~zod/try=> =m (mo `(list ,[@t *])`[['a' 1] ['b' 2] ~])
212+ ~zod/try=> =m (mo `(list {@t *})`[['a' 1] ['b' 2] ~])
213213 ~zod/try=> m
214214 {[p='a' q=1] [p='b' q=2]}
215215 ~zod/try=> (~(get by m) 'a')
@@ -227,17 +227,18 @@ Key existence check
227227
228228 +- has :: key existence check
229229 ~/ %has
230− |* b=*
231− !=(~ (get(+< a) b))
230+ |* b/*
231+ !=(~ (get b))
232+
232233
233234Checks whether map `a` contains an element with key `b`, producing a
234235loobean.
235236
236−`a` is a [map]().
237+`a` is a map.
237238
238−`b` is a key as a [noun]().
239+`b` is a key as a noun.
239240
240− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
241+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
241242 ~zod/try=> (~(has by b) `b`)
242243 %.y
243244 ~zod/try=> (~(has by b) `c`)
@@ -251,7 +252,7 @@ Intersection
251252
252253 +- int :: intersection
253254 ~/ %int
254− |* b=_a
255+ |* b/_a
255256 |- ^+ a
256257 ?~ b
257258 ~
@@ -260,41 +261,42 @@ Intersection
260261 ?: (vor p.n.a p.n.b)
261262 ?: =(p.n.b p.n.a)
262263 [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
263− ?: (hor p.n.b p.n.a)
264− %- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b)
265− %- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b)
264+ ?: (gor p.n.b p.n.a)
265+ %- uni(a $(a l.a, b [n.b l.b ~])) $(b r.b)
266+ %- uni(a $(a r.a, b [n.b ~ r.b])) $(b l.b)
266267 ?: =(p.n.a p.n.b)
267268 [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
268− ?: (hor p.n.a p.n.b)
269− %- uni(+< $(b l.b, a [n.a l.a ~])) $(a r.a)
270− %- uni(+< $(b r.b, a [n.a ~ r.a])) $(a l.a)
269+ ?: (gor p.n.a p.n.b)
270+ %- uni(a $(b l.b, a [n.a l.a ~])) $(a r.a)
271+ %- uni(a $(b r.b, a [n.a ~ r.a])) $(a l.a)
272+ ::
271273
272274Produces a map of the (key) intersection between two maps of the same
273275type, `a` and `b`. If both maps have an identical key that point to
274276different values, the element from map `b` is used.
275277
276−`a` is a [map]().
278+`a` is a map.
277279
278−`b` is a [map]().
280+`b` is a map.
279281
280− ~zod/try=> =n (mo `(list ,[@t *])`[['a' 1] ['c' 3] ~])
282+ ~zod/try=> =n (mo `(list {@t *})`[['a' 1] ['c' 3] ~])
281283 ~zod/try=> n
282284 {[p='a' q=1] [p='c' q=3]}
283285 ~zod/try=> m
284286 {[p='a' q=1] [p='b' q=2]}
285287 ~zod/try=> (~(int by m) n)
286288 {[p='a' q=1]}
287− ~ravpel-holber/try=> =p (mo `(list ,[@t *])`[['a' 2] ['b' 2] ~])
289+ ~ravpel-holber/try=> =p (mo `(list {@t *})`[['a' 2] ['b' 2] ~])
288290 ~zod/try=> p
289291 {[p='a' q=2] [p='b' q=2]}
290292 ~zod/try=> (~(int by p) n)
291293 {[p='a' q=2]}
292− ~zod/try=> =q (mo `(list ,[@t *])`[['a' 2] ['c' 2] ~])
294+ ~zod/try=> =q (mo `(list {@t *})`[['a' 2] ['c' 2] ~])
293295 ~zod/try=> q
294296 {[p='a' q=2] [p='b' q=2]}
295297 ~zod/try=> (~(int by p) q)
296298 {[p='a' q=2] [p='b' q=2]}
297− ~zod/try=> =o (mo `(list ,[@t *])`[['c' 3] ['d' 4] ~])
299+ ~zod/try=> =o (mo `(list {@t *})`[['c' 3] ['d' 4] ~])
298300 ~zod/try=> (~(int by m) o)
299301 {}
300302
@@ -343,7 +345,7 @@ Add key-value pair
343345
344346 +- put :: adds key-value pair
345347 ~/ %put
346− |* [b=* c=*]
348+ |* {b/* c/*}
347349 |- ^+ a
348350 ?~ a
349351 [[b c] ~ ~]
@@ -362,10 +364,11 @@ Add key-value pair
362364 ?: (vor p.n.a p.n.d)
363365 [n.a l.a d]
364366 [n.d [n.a l.a l.d] r.d]
367+ ::
365368
366369Produces `a` with the addition of the key-value pair of `b` and `c`.
367370
368−`a` is a [map]().
371+`a` is a map.
369372
370373`b` is a key of the same type as the keys in `a`.
371374
@@ -386,10 +389,11 @@ Produces `a` with the addition of the key-value pair of `b` and `c`.
386389### `+-rep:by`
387390
388391 +- rep :: replace by product
389− |* [b=* c=_,*]
392+ |* b/_|=({* *} +<+)
390393 |-
391− ?~ a b
392− $(a r.a, b $(a l.a, b (c q.n.a b)))
394+ ?~ a +<+.b
395+ $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
396+ ::
393397
394398Accumulate using gate from values in map
395399
@@ -400,7 +404,7 @@ XX interface changing.
400404### `+-rib:by`
401405
402406 +- rib :: transform + product
403− |* [b=* c=_,*]
407+ |* {b/* c/$-(* *)}
404408 |- ^+ [b a]
405409 ?~ a [b ~]
406410 =+ d=(c n.a b)
@@ -408,6 +412,7 @@ XX interface changing.
408412 =+ e=$(a l.a, b -.d)
409413 =+ f=$(a r.a, b -.e)
410414 [-.f [n.a +.e +.f]]
415+ ::
411416
412417Replace values with accumulator
413418
@@ -419,23 +424,23 @@ XX interface changing, possibly disappearing
419424
420425Transform values
421426
422− +- run :: turns to tuples
423− |* b=_,*
424− |-
427+ +- run :: apply gate to values
428+ |* b/$-(* *)
429+ |-
425430 ?~ a a
426− a(n (b q.n.a), l $(a l.a), r $(a r.a))
431+ [n=[p=p.n.a q=(b q.n.a)] l=$(a l.a) r=$(a r.a)]
427432
428433Iterates over every value in set `a` using gate `b`. Produces a map.
429434
430−`a` is a [map]().
435+`a` is a map.
431436
432−`b` is a [wet gate]().
437+`b` is a wet gate.
433438
434439 ~zod/try=> m
435440 {[p='a' q=1] [p='b' q=2]}
436441 ~zod/try=> ^+(m (~(run by m) dec))
437442 {[p='a' q=0] [p='b' q=1]}
438− ~zod/try=> `(map ,@tas ,@t)`(~(run by m) (cury scot %ux))
443+ ~zod/try=> `(map @tas @t)`(~(run by m) (cury scot %ux))
439444 {[p=%a q='0x1'] [p=%b q='0x2']}
440445
441446------------------------------------------------------------------------
@@ -446,18 +451,19 @@ Listify pairs
446451
447452 +- tap :: listify pairs
448453 ~/ %tap
449− |= b=(list ,_?>(?=(^ a) n.a))
454+ |= b/(list _?>(?=(^ a) n.a))
450455 ^+ b
451456 ?~ a
452457 b
453458 $(a r.a, b [n.a $(a l.a)])
459+ ::
454460
455461Produces the list of all elements in map `a` that is prepended to list
456462`b`, which is empty by default.
457463
458−`a` is a [map]().
464+`a` is a map.
459465
460−`b` is a [list]().
466+`b` is a list.
461467
462468 {[p='a' q=1] [p='b' q=2]}
463469 ~zod/try=> `*`m
@@ -475,7 +481,7 @@ Union
475481
476482 +- uni :: union, merge
477483 ~/ %uni
478− |* b=_a
484+ |* b/_a
479485 |- ^+ a
480486 ?~ b
481487 a
@@ -484,21 +490,21 @@ Union
484490 ?: (vor p.n.a p.n.b)
485491 ?: =(p.n.b p.n.a)
486492 [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
487− ?: (hor p.n.b p.n.a)
493+ ?: (gor p.n.b p.n.a)
488494 $(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
489495 $(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
490496 ?: =(p.n.a p.n.b)
491497 [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
492− ?: (hor p.n.a p.n.b)
498+ ?: (gor p.n.a p.n.b)
493499 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
494500 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
495501
496502Produces a map of the union between the keys of `a` and `b`. If `b`
497503shares a key with `a`, the tuple from `a` is preserved.
498504
499−`a` is a [map]().
505+`a` is a map.
500506
501−`b` is a [map]().
507+`b` is a map.
502508
503509 ~zod/try=> m
504510 {[p='a' q=1] [p='b' q=2]}
@@ -524,8 +530,8 @@ shares a key with `a`, the tuple from `a` is preserved.
524530
525531Turn (with key)
526532
527− +- urn :: turn
528− |* b=$+([* *] *)
533+ +- urn :: apply gate to nodes
534+ |* b/$-({* *} *)
529535 |-
530536 ?~ a ~
531537 [n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)]
@@ -533,9 +539,9 @@ Turn (with key)
533539Iterates over every value in map `a` using gate `b`, which accepts both
534540the key and the value of each element as its sample.
535541
536−`a` is a [map]().
542+`a` is a map.
537543
538−`b` is a [wet gate]() that accepts two nouns (a key and a value) and
544+`b` is a wet gate that accepts two nouns (a key and a value) and
539545produces a noun (the new value).
540546
541547 ~zod/try=> m
@@ -559,7 +565,7 @@ Depth
559565
560566Produce the depth of the tree map `a`.
561567
562−`a` is a [map]().
568+`a` is a map.
563569
564570 ~zod/try=> m
565571 {[p='a' q=1] [p='b' q=2]}