@@ -38,10 +38,10 @@ Computes the logical AND on the results of slamming every element in map
39`b` is a wet gate.
39`b` is a wet gate.
41− ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
41+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
42 ~zod/try=> (~(all by b) |=(a/* ?@(a & |)))
42 ~zod/try=> (~(all by b) |=(a/* ?@(a & |)))
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] ~])
45 ~zod/try=> (~(all by a) |=(a/@ (lte a 6)))
45 ~zod/try=> (~(all by a) |=(a/@ (lte a 6)))
47 ~zod/try=> (~(all by a) |=(a/@ (lte a 4)))
47 ~zod/try=> (~(all by a) |=(a/@ (lte a 4)))
@@ -68,10 +68,10 @@ gate `b`. Produces a loobean.
69`b` is a wet gate.
69`b` is a wet gate.
71− ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
71+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
72− ~zod/try=> (~(all by b) |=(a=* ?@(a & |)))
72+ ~zod/try=> (~(all by b) |=(a/* ?@(a & |)))
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] ~])
75 ~zod/try=> (~(any by a) |=(a=@ (lte a 4)))
75 ~zod/try=> (~(any by a) |=(a=@ (lte a 4)))
@@ -105,7 +105,7 @@ Produces map `a` with the element located at key `b` removed.
106`b` is a key as a noun.
106`b` is a key as a noun.
108− ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
108+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
109 ~zod/try=> (~(del by b) `a`)
109 ~zod/try=> (~(del by b) `a`)
110 {[p=`b` q=[2 3]]}
110 {[p=`b` q=[2 3]]}
@@ -133,7 +133,7 @@ Produce the axis of key `b` within map `a`.
134`b` is a key as a noun.
134`b` is a key as a noun.
136− ~zod/try=> =b (mo `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
136+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
137 ~zod/try=> (~(dig by b) `b`)
137 ~zod/try=> (~(dig by b) `b`)
@@ -145,21 +145,22 @@ Concatenate
146 +- gas :: concatenate
146 +- gas :: concatenate
148− |* b=(list ,[p=* q=*])
149− => .(b `(list ,_?>(?=(^ a) n.a))`b)
148+ |= b/(list _?>(?=(^ a) n.a))
153− $(b t.b, a (put(+< a) p.i.b q.i.b))
152+ $(b t.b, a (put i.b))
155Insert a list of key-value pairs `b` into map `a`.
156Insert a list of key-value pairs `b` into map `a`.
157−`a` is a [map]().
158+`a` is a map.
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`.
161− ~zod/try=> =a (mo `(list ,[@t *])`[[`a` 1] [`b` 2] ~])
162+ ~zod/try=> =a (mo `(list {@t *})`[[`a` 1] [`b` 2] ~])
162− ~zod/try=> =b `(list ,[@t *])`[[`c` 3] [`d` 4] ~]
163+ ~zod/try=> =b `(list {@t *})`[[`c` 3] [`d` 4] ~]
163 ~zod/try=> (~(gas by a) b)
164 ~zod/try=> (~(gas by a) b)
164 {[p=`d` q=4] [p=`a` q=1] [p=`c` q=3] [p=`b` q=2]}
165 {[p=`d` q=4] [p=`a` q=1] [p=`c` q=3] [p=`b` q=2]}
@@ -183,11 +184,11 @@ Grab unit value
184Produce the unit value of the value located at key `b` within map `a`.
185Produce the unit value of the value located at key `b` within map `a`.
186−`a` is a [map]()
187+`a` is a map
188−`b` is a [key]() as a [noun]()
189+`b` is a key as a noun
190− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
191+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
191 ~zod/try=> (~(get by b) `b`)
192 ~zod/try=> (~(get by b) `b`)
192 [~ [2 3]]
193 [~ [2 3]]
@@ -198,18 +199,17 @@ Produce the unit value of the value located at key `b` within map `a`.
202− %- need
203+ (need (get b))
205Produce the value located at key `b` within map `a`. Crash if key `b`
205Produce the value located at key `b` within map `a`. Crash if key `b`
206does not exist.
206does not exist.
208−`a` is a [map]().
208+`a` is a map.
210−`b` is a [key]().
210+`b` is a key.
212− ~zod/try=> =m (mo `(list ,[@t *])`[['a' 1] ['b' 2] ~])
212+ ~zod/try=> =m (mo `(list {@t *})`[['a' 1] ['b' 2] ~])
213 ~zod/try=> m
213 ~zod/try=> m
214 {[p='a' q=1] [p='b' q=2]}
214 {[p='a' q=1] [p='b' q=2]}
215 ~zod/try=> (~(get by m) 'a')
215 ~zod/try=> (~(get by m) 'a')
@@ -227,17 +227,18 @@ Key existence check
228 +- has :: key existence check
228 +- has :: key existence check
231− !=(~ (get(+< a) b))
231+ !=(~ (get b))
233Checks whether map `a` contains an element with key `b`, producing a
234Checks whether map `a` contains an element with key `b`, producing a
236−`a` is a [map]().
237+`a` is a map.
238−`b` is a key as a [noun]().
239+`b` is a key as a noun.
240− ~zod/try=> =b (mo `(list ,[@t *])`[['a' 1] ['b' [2 3]] ~])
241+ ~zod/try=> =b (mo `(list {@t *})`[['a' 1] ['b' [2 3]] ~])
241 ~zod/try=> (~(has by b) `b`)
242 ~zod/try=> (~(has by b) `b`)
243 ~zod/try=> (~(has by b) `c`)
244 ~zod/try=> (~(has by b) `c`)
@@ -251,7 +252,7 @@ Intersection
252 +- int :: intersection
253 +- int :: intersection
@@ -260,41 +261,42 @@ Intersection
260 ?: (vor p.n.a p.n.b)
261 ?: (vor p.n.a p.n.b)
261 ?: =(p.n.b p.n.a)
262 ?: =(p.n.b p.n.a)
262 [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
263 [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
263− ?: (hor p.n.b p.n.a)
264+ ?: (gor p.n.b p.n.a)
264− %- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b)
265+ %- uni(a $(a l.a, b [n.b l.b ~])) $(b r.b)
265− %- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b)
266+ %- uni(a $(a r.a, b [n.b ~ r.b])) $(b l.b)
266 ?: =(p.n.a p.n.b)
267 ?: =(p.n.a p.n.b)
267 [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
268 [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
268− ?: (hor p.n.a p.n.b)
269+ ?: (gor p.n.a p.n.b)
269− %- uni(+< $(b l.b, a [n.a l.a ~])) $(a r.a)
270+ %- uni(a $(b l.b, a [n.a l.a ~])) $(a r.a)
270− %- uni(+< $(b r.b, a [n.a ~ r.a])) $(a l.a)
271+ %- uni(a $(b r.b, a [n.a ~ r.a])) $(a l.a)
272Produces a map of the (key) intersection between two maps of the same
274Produces a map of the (key) intersection between two maps of the same
273type, `a` and `b`. If both maps have an identical key that point to
275type, `a` and `b`. If both maps have an identical key that point to
274different values, the element from map `b` is used.
276different values, the element from map `b` is used.
276−`a` is a [map]().
278+`a` is a map.
278−`b` is a [map]().
280+`b` is a map.
280− ~zod/try=> =n (mo `(list ,[@t *])`[['a' 1] ['c' 3] ~])
282+ ~zod/try=> =n (mo `(list {@t *})`[['a' 1] ['c' 3] ~])
281 ~zod/try=> n
283 ~zod/try=> n
282 {[p='a' q=1] [p='c' q=3]}
284 {[p='a' q=1] [p='c' q=3]}
283 ~zod/try=> m
285 ~zod/try=> m
284 {[p='a' q=1] [p='b' q=2]}
286 {[p='a' q=1] [p='b' q=2]}
285 ~zod/try=> (~(int by m) n)
287 ~zod/try=> (~(int by m) n)
286 {[p='a' q=1]}
288 {[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] ~])
288 ~zod/try=> p
290 ~zod/try=> p
289 {[p='a' q=2] [p='b' q=2]}
291 {[p='a' q=2] [p='b' q=2]}
290 ~zod/try=> (~(int by p) n)
292 ~zod/try=> (~(int by p) n)
291 {[p='a' q=2]}
293 {[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] ~])
293 ~zod/try=> q
295 ~zod/try=> q
294 {[p='a' q=2] [p='b' q=2]}
296 {[p='a' q=2] [p='b' q=2]}
295 ~zod/try=> (~(int by p) q)
297 ~zod/try=> (~(int by p) q)
296 {[p='a' q=2] [p='b' q=2]}
298 {[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] ~])
298 ~zod/try=> (~(int by m) o)
300 ~zod/try=> (~(int by m) o)
@@ -343,7 +345,7 @@ Add key-value pair
344 +- put :: adds key-value pair
346 +- put :: adds key-value pair
346− |* [b=* c=*]
348+ |* {b/* c/*}
349 [[b c] ~ ~]
351 [[b c] ~ ~]
@@ -362,10 +364,11 @@ Add key-value pair
362 ?: (vor p.n.a p.n.d)
364 ?: (vor p.n.a p.n.d)
363 [n.a l.a d]
365 [n.a l.a d]
364 [n.d [n.a l.a l.d] r.d]
366 [n.d [n.a l.a l.d] r.d]
366Produces `a` with the addition of the key-value pair of `b` and `c`.
369Produces `a` with the addition of the key-value pair of `b` and `c`.
368−`a` is a [map]().
371+`a` is a map.
370`b` is a key of the same type as the keys in `a`.
373`b` is a key of the same type as the keys in `a`.
@@ -386,10 +389,11 @@ Produces `a` with the addition of the key-value pair of `b` and `c`.
386### `+-rep:by`
389### `+-rep:by`
388 +- rep :: replace by product
391 +- rep :: replace by product
389− |* [b=* c=_,*]
392+ |* b/_|=({* *} +<+)
391− ?~ a b
394+ ?~ a +<+.b
392− $(a r.a, b $(a l.a, b (c q.n.a b)))
395+ $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
394Accumulate using gate from values in map
398Accumulate using gate from values in map
@@ -400,7 +404,7 @@ XX interface changing.
400### `+-rib:by`
404### `+-rib:by`
402 +- rib :: transform + product
406 +- rib :: transform + product
403− |* [b=* c=_,*]
407+ |* {b/* c/$-(* *)}
404 |- ^+ [b a]
408 |- ^+ [b a]
405 ?~ a [b ~]
409 ?~ a [b ~]
406 =+ d=(c n.a b)
410 =+ d=(c n.a b)
@@ -408,6 +412,7 @@ XX interface changing.
408 =+ e=$(a l.a, b -.d)
412 =+ e=$(a l.a, b -.d)
409 =+ f=$(a r.a, b -.e)
413 =+ f=$(a r.a, b -.e)
410 [-.f [n.a +.e +.f]]
414 [-.f [n.a +.e +.f]]
412Replace values with accumulator
417Replace values with accumulator
@@ -419,23 +424,23 @@ XX interface changing, possibly disappearing
420Transform values
425Transform values
422− +- run :: turns to tuples
427+ +- run :: apply gate to values
423− |* b=_,*
428+ |* b/$-(* *)
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)]
428Iterates over every value in set `a` using gate `b`. Produces a map.
433Iterates over every value in set `a` using gate `b`. Produces a map.
430−`a` is a [map]().
435+`a` is a map.
432−`b` is a [wet gate]().
437+`b` is a wet gate.
434 ~zod/try=> m
439 ~zod/try=> m
435 {[p='a' q=1] [p='b' q=2]}
440 {[p='a' q=1] [p='b' q=2]}
436 ~zod/try=> ^+(m (~(run by m) dec))
441 ~zod/try=> ^+(m (~(run by m) dec))
437 {[p='a' q=0] [p='b' q=1]}
442 {[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))
439 {[p=%a q='0x1'] [p=%b q='0x2']}
444 {[p=%a q='0x1'] [p=%b q='0x2']}
441------------------------------------------------------------------------
446------------------------------------------------------------------------
@@ -446,18 +451,19 @@ Listify pairs
447 +- tap :: listify pairs
452 +- tap :: listify pairs
449− |= b=(list ,_?>(?=(^ a) n.a))
454+ |= b/(list _?>(?=(^ a) n.a))
453 $(a r.a, b [n.a $(a l.a)])
458 $(a r.a, b [n.a $(a l.a)])
455Produces the list of all elements in map `a` that is prepended to list
461Produces the list of all elements in map `a` that is prepended to list
456`b`, which is empty by default.
462`b`, which is empty by default.
458−`a` is a [map]().
464+`a` is a map.
460−`b` is a [list]().
466+`b` is a list.
462 {[p='a' q=1] [p='b' q=2]}
468 {[p='a' q=1] [p='b' q=2]}
463 ~zod/try=> `*`m
469 ~zod/try=> `*`m
@@ -475,7 +481,7 @@ Union
476 +- uni :: union, merge
482 +- uni :: union, merge
@@ -484,21 +490,21 @@ Union
484 ?: (vor p.n.a p.n.b)
490 ?: (vor p.n.a p.n.b)
485 ?: =(p.n.b p.n.a)
491 ?: =(p.n.b p.n.a)
486 [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
492 [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)
488 $(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
494 $(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
489 $(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
495 $(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
490 ?: =(p.n.a p.n.b)
496 ?: =(p.n.a p.n.b)
491 [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
497 [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)
493 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
499 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
494 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
500 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
496Produces a map of the union between the keys of `a` and `b`. If `b`
502Produces a map of the union between the keys of `a` and `b`. If `b`
497shares a key with `a`, the tuple from `a` is preserved.
503shares a key with `a`, the tuple from `a` is preserved.
499−`a` is a [map]().
505+`a` is a map.
501−`b` is a [map]().
507+`b` is a map.
503 ~zod/try=> m
509 ~zod/try=> m
504 {[p='a' q=1] [p='b' q=2]}
510 {[p='a' q=1] [p='b' q=2]}
@@ -524,8 +530,8 @@ shares a key with `a`, the tuple from `a` is preserved.
525Turn (with key)
531Turn (with key)
527− +- urn :: turn
533+ +- urn :: apply gate to nodes
528− |* b=$+([* *] *)
534+ |* b/$-({* *} *)
531 [n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)]
537 [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)
533Iterates over every value in map `a` using gate `b`, which accepts both
539Iterates over every value in map `a` using gate `b`, which accepts both
534the key and the value of each element as its sample.
540the key and the value of each element as its sample.
536−`a` is a [map]().
542+`a` is a map.
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
539produces a noun (the new value).
545produces a noun (the new value).
541 ~zod/try=> m
547 ~zod/try=> m
@@ -559,7 +565,7 @@ Depth
560Produce the depth of the tree map `a`.
566Produce the depth of the tree map `a`.
562−`a` is a [map]().
568+`a` is a map.
564 ~zod/try=> m
570 ~zod/try=> m
565 {[p='a' q=1] [p='b' q=2]}
571 {[p='a' q=1] [p='b' q=2]}