@@ -8,88 +8,288 @@ navhome: /docs/
9Map operations
9Map operations
11− ++ by :: map engine
11+Container arm for map operation arms. A map is a set of key-value pairs. The
12− ~/ %by
12+contained arms inherit its sample map, `a`.
16−Container arm for map operation arms. A map is a set of key, value
14+### Accepts
17−pairs. The contained arms inherit it's sample map, `a`.
19`a` is a map.
16`a` is a map.
21− > ~(. by (my [%a 1] [%b 2] ~))
20+ ++ by
22− <22.znh {a/nlr({p/?($a $b) q/@ud}) <409.ofg 110.xht 1.ztu $151>}>
21+ ~/ %by
23+ =* node ?>(?=(^ a) n.a)
24−------------------------------------------------------------------------
27+ > ~(. by (my [%a 1] [%b 2] ~))
31+ { n/{?(p/$a p/$b) q/@ud}
32+ l/nlr({p/?($b $a) q/@ud})
33+ r/nlr({p/?($b $a) q/@ud})
37+ <119.wim 31.ohr 1.jmk $143>
26### `+-all:by`
41### `+-all:by`
28Logical AND
43Logical AND
30− +- all :: logical AND
45+Computes the logical AND on the results of slamming every element in map `a`
32− |* b/$-(* ?)
62+ |* b=$-(* ?)
36 ?&((b q.n.a) $(a l.a) $(a r.a))
66 ?&((b q.n.a) $(a l.a) $(a r.a))
40−Computes the logical AND on the results of slamming every element in map
68+#### Examples
41−`a` with gate `b`. Produces a loobean.
47 > =b (my [['a' 1] ['b' [2 3]] ~])
70 > =b (my [['a' 1] ['b' [2 3]] ~])
48− > (~(all by b) |=(a/* ?@(a & |)))
71+ > (~(all by b) |=(a=* ?@(a & |)))
50 > =a (my [['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
74 > =a (my [['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
51− > (~(all by a) |=(a/@ (lte a 6)))
75+ > (~(all by a) |=(a=@ (lte a 6)))
53− > (~(all by a) |=(a/@ (lte a 4)))
56−------------------------------------------------------------------------
78+ > (~(all by a) |=(a=@ (lte a 4)))
58### `+-any:by`
82### `+-any:by`
86+Computes the logical OR on the results of slamming every element with
62− +- any :: logical OR
101+ +- any
64− |* b=$+(* ?)
103+ |* b=$-(* ?)
68 ?|((b q.n.a) $(a l.a) $(a r.a))
107 ?|((b q.n.a) $(a l.a) $(a r.a))
70−Computes the logical OR on the results of slamming every element with
109+#### Examples
71−gate `b`. Produces a loobean.
77 > =b (my [['a' 1] ['b' [2 3]] ~])
111 > =b (my [['a' 1] ['b' [2 3]] ~])
78− > (~(any by b) |=(a/* ?@(a & |)))
112+ > (~(any by b) |=(a=* ?@(a & |)))
80 > =a (my [['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
115 > =a (my [['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
81− > (~(any by a) |=(a/@ (lte a 4)))
116+ > (~(any by a) |=(a=@ (lte a 4)))
84−------------------------------------------------------------------------
119+***
124+Computes whether `a` has a correct horizontal order and a correct vertical
125+order, producing a flag.
138+ =| [l=(unit) r=(unit)]
141+ ?& ?~(l & (gor p.n.a u.l))
142+ ?~(r & (gor u.r p.n.a))
143+ ?~(l.a & ?&((vor p.n.a p.n.l.a) $(a l.a, l `p.n.a)))
144+ ?~(r.a & ?&((vor p.n.a p.n.r.a) $(a r.a, r `p.n.a)))
149+ > =a (my [['a' 1] ['b' [2 3]] ~])
153+ > =s (my [[1 2] [3 4] ~])
154+ > =z ?~ s ~ s(p.n 10)
156+ [n=[p=10 q=2] l={} r={[p=3 q=4]}]
163+See section [`2f`](../2f) for more information on noun ordering.
169+Splits map `a` into two maps `l` and `r`, with the head at `b` discarded.
200+ [n.d l.d [n.a r.d r.a]]
203+ [n.d [n.a l.a l.d] r.d]
207+ > =a (my [['a' 1] ['b' 2] ['c' 3] ~])
209+ > (~(bif by a) ['b' 2])
210+ [l=[n=[p='c' q=3] l=[n=[p='a' q=1] l={} r={}] r=~] r=~]
231+ ^- (map _p:node (pair (unit _q:node) (unit _q:node)))
257+ =+ c=~(tap by (def b))
258+ =+ [d e]=[`_a`~ `_a`~]
263+ d ?~(q.q.i.c d (~(put by d) p.i.c u.q.q.i.c))
264+ e ?~(p.q.i.c e (~(put by e) p.i.c u.p.q.i.c))
86### `+-del:by`
272### `+-del:by`
90− +- del :: delete at key b
276+Produces map `a` with the element located at key `b` removed.
282+`b` is a key as a noun.
@@ -97,32 +297,40 @@ Delete
97 ?: (gor b p.n.a)
297 ?: (gor b p.n.a)
98 [n.a $(a l.a) r.a]
298 [n.a $(a l.a) r.a]
99 [n.a l.a $(a r.a)]
299 [n.a l.a $(a r.a)]
100− |- ^- {$?($~ _a)}
300+ |- ^- [(~ _a)]
101 ?~ l.a r.a
301 ?~ l.a r.a
102 ?~ r.a l.a
302 ?~ r.a l.a
103 ?: (vor p.n.l.a p.n.r.a)
303 ?: (vor p.n.l.a p.n.r.a)
104 [n.l.a l.l.a $(l.a r.l.a)]
304 [n.l.a l.l.a $(l.a r.l.a)]
105 [n.r.a $(r.a l.r.a) r.r.a]
305 [n.r.a $(r.a l.r.a) r.r.a]
108−Produces map `a` with the element located at key `b` removed.
307+#### Examples
309+ > =b (my [['a' 1] ['b' [2 3]] ~])
311+ [n=[p='b' q=[2 3]] l=~ r=~]
318+Produce the address of key `b` within map `a`.
110`a` is a map.
322`a` is a map.
112`b` is a key as a noun.
324`b` is a key as a noun.
114− > =b (my [['a' 1] ['b' [2 3]] ~])
326+#### Produces
118−------------------------------------------------------------------------
328+A unit.
120−### `+-dig:by`
330+#### Source
124− +- dig :: axis of b key
332+ +- dig
127 |- ^- (unit @)
335 |- ^- (unit @)
@@ -130,56 +338,74 @@ Axis of key
130 ?: (gor b p.n.a)
338 ?: (gor b p.n.a)
131 $(a l.a, c (peg c 6))
339 $(a l.a, c (peg c 6))
132 $(a r.a, c (peg c 7))
340 $(a r.a, c (peg c 7))
136−Produce the axis of key `b` within map `a`.
138−`a` is a map.
343+#### Examples
140−`b` is a key as a noun.
142 > =b (my [['a' 1] ['b' [2 3]] ~])
345 > =b (my [['a' 1] ['b' [2 3]] ~])
143 > (~(dig by b) 'b')
346 > (~(dig by b) 'b')
146−------------------------------------------------------------------------
148### `+-gas:by`
350### `+-gas:by`
150Concatenate
352Concatenate
152− +- gas :: concatenate
154− |= b/(list _?>(?=(^ a) n.a))
158− $(b t.b, a (put i.b))
162Insert a list of key-value pairs `b` into map `a`.
354Insert a list of key-value pairs `b` into map `a`.
164`a` is a map.
358`a` is a map.
166`b` is a list of cells of key-value nouns `p` and `q`.
360`b` is a list of cells of key-value nouns `p` and `q`.
370+ |* b=(list [p=* q=*])
371+ => .(b `(list _?>(?=(^ a) n.a))`b)
375+ $(b t.b, a (put p.i.b q.i.b))
168 > =a (my [['a' 1] ['b' 2] ~])
379 > =a (my [['a' 1] ['b' 2] ~])
169 > =b [['c' 3] ['d' 4] ~]
380 > =b [['c' 3] ['d' 4] ~]
171− {[p='d' q=4] [p='a' q=1] [p='c' q=3] [p='b' q=2]}
173−------------------------------------------------------------------------
382+ > (~(gas by a) b)
383+ [n=[p='b' q=2] l=[n=[p='d' q=4] l={} r={[p='a' q=1] [p='c' q=3]}] r=~]
175### `+-get:by`
386### `+-get:by`
177Grab unit value
388Grab unit value
179− +- get :: unit value by key
390+Produce the unit value of the value located at key `b` within map `a`.
396+`b` is a key as a noun.
182− |- ^- ?(~ [~ u=_?>(?=(^ a) q.n.a)])
407+ ^- [$@(~ [~ u=_?>(?=(^ a) q.n.a)])]
185 ?: =(b p.n.a)
411 ?: =(b p.n.a)
@@ -188,77 +414,112 @@ Grab unit value
191−Produce the unit value of the value located at key `b` within map `a`.
417+#### Examples
193−`a` is a map
419+ > =b (my [['a' 1] ['b' [2 3]] ~])
195−`b` is a key as a noun
197− > =b (my [['a' 1] ['b' [2 3]] ~])
424+ > =m (my [['a' 1] ['b' 2] ~])
198− > (~(get by b) 'b')
425+ > (~(get by m) 'a')
199− [~ [2 3]]
426+ [~ u=1]
201−------------------------------------------------------------------------
203### `+-got:by`
430### `+-got:by`
434+Produce the value located at key `b` within map `a`. Crash if key `b` does not
441+`b` is a key as a noun.
209 (need (get b))
451 (need (get b))
211−Produce the value located at key `b` within map `a`. Crash if key `b`
453+#### Examples
214−`a` is a map.
455+ > =m (my [['a' 1] ['b' 2] ~])
457+ [n=[p='b' q=2] l={[p='a' q=1]} r={}]
216−`b` is a key.
459+ > (~(got by m) 'a')
218− > =m (my [['a' 1] ['b' 2] ~])
220− {[p='a' q=1] [p='b' q=2]}
225− > (~(got by m) 'c')
462+ > (~(got by m) 'c')
228−------------------------------------------------------------------------
230### `+-has:by`
467### `+-has:by`
232Key existence check
469Key existence check
234− +- has :: key existence check
471+Checks whether map `a` contains an element with key `b`, producing a flag.
240−Checks whether map `a` contains an element with key `b`, producing a
243`a` is a map.
475`a` is a map.
245`b` is a key as a noun.
477`b` is a key as a noun.
247− > =b (my [['a' 1] ['b' [2 3]] ~])
479+#### Produces
248− > (~(has by b) 'b')
480+
253−------------------------------------------------------------------------
483+#### Source
492+ > =b (my [['a' 1] ['b' [2 3]] ~])
255### `+-int:by`
500### `+-int:by`
257Intersection
502Intersection
259− +- int :: intersection
504+Produces a map of the (key) intersection between two maps of the same type, `a`
505+and `b`. If both maps have an identical key that point to different values, the
506+element from map `b` is used.
@@ -275,83 +536,98 @@ Intersection
275 ?: (gor p.n.a p.n.b)
536 ?: (gor p.n.a p.n.b)
276 %- uni(a $(b l.b, a [n.a l.a ~])) $(a r.a)
537 %- uni(a $(b l.b, a [n.a l.a ~])) $(a r.a)
277 %- uni(a $(b r.b, a [n.a ~ r.a])) $(a l.a)
538 %- uni(a $(b r.b, a [n.a ~ r.a])) $(a l.a)
280−Produces a map of the (key) intersection between two maps of the same
540+#### Examples
281−type, `a` and `b`. If both maps have an identical key that point to
282−different values, the element from map `b` is used.
284−`a` is a map.
542+ > =n (my [['a' 1] ['c' 3] ~])
543+ > =m (my [['a' 1] ['b' 2] ~])
286−`b` is a map.
545+ > (~(int by m) n)
546+ [n=[p='a' q=1] l=~ r=~]
548+ > =p (my [['a' 2] ['b' 2] ~])
550+ [n=[p='b' q=2] l={[p='a' q=2]} r={}]
552+ [n=[p='a' q=1] l=~ r=~]
554+ > =q (my [['a' 2] ['c' 2] ~])
556+ [n=[p='c' q=2] l={[p='a' q=2]} r={}]
558+ [n=[p='a' q=2] l=~ r=~]
288− > =n (my [['a' 1] ['c' 3] ~])
290− {[p='a' q=1] [p='c' q=3]}
292− {[p='a' q=1] [p='b' q=2]}
295− > =p (my [['a' 2] ['b' 2] ~])
297− {[p='a' q=2] [p='b' q=2]}
300− > =q (my [['a' 2] ['c' 2] ~])
302− {[p='a' q=2] [p='c' q=2]}
305− > =o (my [['c' 3] ['d' 4] ~])
560+ > =o (my [['c' 3] ['d' 4] ~])
306− > (~(int by m) o)
561+ > (~(int by m) o)
310−------------------------------------------------------------------------
312### `+-mar:by`
566### `+-mar:by`
314−Assert and Add
568+Assert and add
570+Produces map `a` with the addition of a key-value pair, where the value is a
316− +- mar :: add with validation
573+Accept a noun and a unit of a noun of the type of the map's keys and values,
574+respectively. Validate that the value is not null and put the pair in the map.
575+If the value is null, delete the key.
317 |* [b=_?>(?=(^ a) p.n.a) c=(unit ,_?>(?=(^ a) q.n.a))]
590 |* [b=_?>(?=(^ a) p.n.a) c=(unit ,_?>(?=(^ a) q.n.a))]
320 (put b u.c)
593 (put b u.c)
322−Produces map `a` with the addition of a key-value pair, where the value
595+#### Examples
325−Accept a noun and a unit of a noun of the type of the map's keys and
326−values, respectively. Validate that the value is not null and put the
327−pair in the map. If the value is null, delete the key.
329−XX This arm is broken, asana task 15186618346453
597+ > =m (my [['a' 1] ['b' 2] ~])
598+ > (~(mar by m) 'c' (some 3))
599+ [n=[p='b' q=2] l=[n=[p='c' q=3] l=[n=[p='a' q=1] l={} r={}] r=~] r=~]
331− > m
601+ > (~(mar by m) 'c' ~)
332− {[p='a' q=1] [p='b' q=2]}
602+ [n=[p='b' q=2] l=[n=[p='a' q=1] l=~ r=~] r=~]
333− > (~(mar by m) 'c' (some 3))
337− > (~(mar by m) 'c' ~)
341− > (~(mar by m) 'b' ~)
346−------------------------------------------------------------------------
604+ > (~(mar by m) 'b' ~)
605+ [n=[p='a' q=1] l=~ r=~]
348### `+-put:by`
608### `+-put:by`
350Add key-value pair
610Add key-value pair
352− +- put :: adds key-value pair
612+Produces `a` with the addition of the key-value pair of `b` and `c`.
618+`b` is a key of the same type as the keys in `a`.
620+`c` is a value of the same type of the values in `a`.
354− |* {b/* c/*}
630+ |* [b=* c=*]
357 [[b c] ~ ~]
633 [[b c] ~ ~]
@@ -370,47 +646,77 @@ Add key-value pair
370 ?: (vor p.n.a p.n.d)
646 ?: (vor p.n.a p.n.d)
371 [n.a l.a d]
647 [n.a l.a d]
372 [n.d [n.a l.a l.d] r.d]
648 [n.d [n.a l.a l.d] r.d]
375−Produces `a` with the addition of the key-value pair of `b` and `c`.
650+#### Examples
377−`a` is a map.
652+ > =m (my [['a' 1] ['b' 2] ~])
378−
653+ > (~(put by ~) 'c' 3)
379−`b` is a key of the same type as the keys in `a`.
654+ [n=[p='b' q=2] l=[n=[p='c' q=3] l={[p='a' q=1]} r={}] r=~]
381−`c` is a value of the same type of the values in `a`.
384− {[p='a' q=1] [p='b' q=2]}
385− > (~(put by m) 'c' 3)
386− {[p='a' q=1] [p='c' q=3] [p='b' q=2]}
387 > (~(put by m) "zod" 26)
656 > (~(put by m) "zod" 26)
388− ! type-fail
657+ ! nest-fail
390 > (~(put by m) 'a' 2)
660 > (~(put by m) 'a' 2)
391− {[p='a' q=2] [p='b' q=2]}
661+ [n=[p='b' q=2] l=[n=[p='a' q=2] l={} r={}] r=~]
664+ {[p=[[98 2] [[97 1] 0 0] 0] q=[97 2]]}
393−------------------------------------------------------------------------
395### `+-rep:by`
668### `+-rep:by`
397− +- rep :: replace by product
670+Replace by product
672+Accumulate elements of map `a` using gate `b`, producing a noun.
398− |* b/_|=({* *} +<+)
687+ |* b=_|=([* *] +<+)
400 ?~ a +<+.b
689 ?~ a +<+.b
401 $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
690 $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
404−Accumulate using gate from values in map
692+#### Examples
406−XX interface changing.
694+ > =m (my [['a' 1] ['b' 2] ~])
695+ > (~(rep by m) |=(a=(pair * *) p.a))
408−------------------------------------------------------------------------
410### `+-rib:by`
700### `+-rib:by`
412− +- rib :: transform + product
702+Replace values with accumulator
413− |* {b/* c/gate}
719+ |* [b=* c=gate]
414 |- ^+ [b a]
720 |- ^+ [b a]
415 ?~ a [b ~]
721 ?~ a [b ~]
416 =+ d=(c n.a b)
722 =+ d=(c n.a b)
@@ -418,77 +724,143 @@ XX interface changing.
418 =+ e=$(a l.a, b -.d)
724 =+ e=$(a l.a, b -.d)
419 =+ f=$(a r.a, b -.e)
725 =+ f=$(a r.a, b -.e)
420 [-.f [n.a +.e +.f]]
726 [-.f [n.a +.e +.f]]
423−Replace values with accumulator
728+#### Examples
425−XX interface changing, possibly disappearing
730+ > =m (my [['a' 1] ['b' 2] ~])
731+ > (~(rib by m) [1 2] (con by m))
427−------------------------------------------------------------------------
733+ > (~(rep by m) [1 2] |=(a=(pair * *) p.a))
429### `+-run:by`
736### `+-run:by`
431Transform values
738Transform values
433− +- run :: apply gate to values
740+Iterates over every value in map `a` using gate `b`, producing a map.
437− [n=[p=p.n.a q=(b q.n.a)] l=$(a l.a) r=$(a r.a)]
439−Iterates over every value in set `a` using gate `b`. Produces a map.
742+#### Accepts
441`a` is a map.
744`a` is a map.
443`b` is a wet gate.
746`b` is a wet gate.
445− > m
748+#### Produces
758+ [n=[p=p.n.a q=(b q.n.a)] l=$(a l.a) r=$(a r.a)]
446− {[p='a' q=1] [p='b' q=2]}
762+ > =m (my [['a' 1] ['b' 2] ~])
447 > ^+(m (~(run by m) dec))
764 > ^+(m (~(run by m) dec))
448− {[p='a' q=0] [p='b' q=1]}
765+ [n=[p='b' q=1] l={[p='a' q=0]} r={}]
449 > `(map @tas @t)`(~(run by m) (cury scot %ux))
767 > `(map @tas @t)`(~(run by m) (cury scot %ux))
450 {[p=%a q='0x1'] [p=%b q='0x2']}
768 {[p=%a q='0x1'] [p=%b q='0x2']}
452−------------------------------------------------------------------------
776+Applies a gate `b` to nodes in map `a`.
794+ [n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)]
798+ > =m (my [['a' 1] ['b' 2] ~])
454### `+-tap:by`
801### `+-tap:by`
456Listify pairs
803Listify pairs
458− +- tap :: listify pairs
805+Produces the list of all elements in map `a` that is prepended to list `b`,
459− ~/ %tap
806+which is empty by default.
460− |= b/(list _?>(?=(^ a) n.a))
464− $(a r.a, b [n.a $(a l.a)])
467−Produces the list of all elements in map `a` that is prepended to list
808+#### Accepts
468−`b`, which is empty by default.
470`a` is a map.
810`a` is a map.
472`b` is a list.
812`b` is a list.
474− > m
814+#### Produces
823+ =| b=(list _?>(?=(^ a) n.a))
827+ $(a r.a, b [n.a $(a l.a)])
831+ > =m (my [['a' 1] ['b' 2] ~])
475− {[p='a' q=1] [p='b' q=2]}
832+ [n=[p='b' q=2] l={[p='a' q=1]} r={}]
477 [[98 2] [[97 1] 0 0] 0]
834 [[98 2] [[97 1] 0 0] 0]
478− > (~(tap by m))
836+ > ~(tap by m)
479 ~[[p='b' q=2] [p='a' q=1]]
837 ~[[p='b' q=2] [p='a' q=1]]
480− > `*`(~(tap by m))
838+ > `*`~(tap by m)
481 [[98 2] [97 1] 0]
839 [[98 2] [97 1] 0]
483−------------------------------------------------------------------------
841+***
485### `+-uni:by`
842### `+-uni:by`
489− +- uni :: union, merge
846+Produces a map of the union between the keys of `a` and `b`. If `b` shares a
847+key with `a`, the tuple from `b` is preserved.
@@ -506,83 +878,101 @@ Union
506 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
878 $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
507 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
879 $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
509−Produces a map of the union between the keys of `a` and `b`. If `b`
881+#### Examples
510−shares a key with `a`, the tuple from `b` is preserved.
512−`a` is a map.
883+ > =m (my [['a' 1] ['b' 2] ~])
514−`b` is a map.
885+ > =o (my [['c' 3] ['d' 4] ~])
517− {[p='a' q=1] [p='b' q=2]}
519− {[p='d' q=4] [p='c' q=3]}
520 > (~(uni by m) o)
887 > (~(uni by m) o)
521− {[p='d' q=4] [p='a' q=1] [p='c' q=3] [p='b' q=2]}
888+ [n=[p='b' q=2] l=[n=[p='d' q=4] l={} r={[p='a' q=1] [p='c' q=3]}] r=~]
522 > (~(uni by m) ~)
890 > (~(uni by m) ~)
523 {[p='a' q=1] [p='b' q=2]}
891 {[p='a' q=1] [p='b' q=2]}
525 {[p='a' q=1] [p='c' q=3]}
894 {[p='a' q=1] [p='c' q=3]}
526 > (~(uni by o) n)
895 > (~(uni by o) n)
527 {[p='d' q=4] [p='a' q=1] [p='c' q=3]}
896 {[p='d' q=4] [p='a' q=1] [p='c' q=3]}
529−------------------------------------------------------------------------
531### `+-urn:by`
900### `+-urn:by`
533Turn (with key)
902Turn (with key)
535− +- urn :: apply gate to nodes
539− [n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)]
541Iterates over every value in map `a` using gate `b`, which accepts both
904Iterates over every value in map `a` using gate `b`, which accepts both
542the key and the value of each element as its sample.
905the key and the value of each element as its sample.
544`a` is a map.
909`a` is a map.
546−`b` is a wet gate that accepts two nouns (a key and a value) and
911+`b` is a wet gate that accepts two nouns.
547−produces a noun (the new value).
912+
923+ [n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)
550 {[p='a' q=1] [p='b' q=2]}
929 {[p='a' q=1] [p='b' q=2]}
552− > (~(urn by m) |=(a/(pair * *) q.a))
931+ > (~(urn by m) |=(a=(pair * *) q.a))
553 {[p='a' q=1] [p='b' q=2]}
932 {[p='a' q=1] [p='b' q=2]}
555− > (~(urn by m) |=(a/(pair * *) 7))
934+ > (~(urn by m) |=(a=(pair * *) 7))
556 {[p='a' q=7] [p='b' q=7]}
935 {[p='a' q=7] [p='b' q=7]}
558− > (~(urn by m) |=(a/(pair * *) p.a))
937+ > (~(urn by m) |=(a=(pair * *) p.a))
559 {[p='a' q=97] [p='b' q=98]}
938 {[p='a' q=97] [p='b' q=98]}
561−------------------------------------------------------------------------
940+***
563### `+-wyt:by`
942### `+-wyt:by`
567− +- wyt :: depth of map
946+Produce the depth of the tree map `a`.
569 ?~(a 0 +((add $(a l.a) $(a r.a))))
960 ?~(a 0 +((add $(a l.a) $(a r.a))))
571−Produce the depth of the tree map `a`.
962+#### Examples
573−`a` is a map.
964+ > =m (my [['a' 1] ['b' 2] ~])
966+ > =o (my [['c' 3] ['d' 4] ~])
576− {[p='a' q=1] [p='b' q=2]}
578− {[p='d' q=4] [p='c' q=3]}
579 > ~(wyt by m)
968 > ~(wyt by m)
581 > ~(wyt by o)
971 > ~(wyt by o)
583 > ~(wyt by (~(uni by m) o))
974 > ~(wyt by (~(uni by m) o))