3 title/'2o: Normalizing Containers'
8# 2o: normalizing containers
12Mold generator. A `jar` is a `map` of `list`.
17 ++ jar |*([a=mold b=mold] (map a (list b)))
31 > =c (my [[%a a] [%b b] ~])
33 [n=[p=%b q=[i=3 t=~[4]]] l={[p=%a q=[i=1 t=[i=2 t=~]]]} r={}]
44See also: [`ja`](../2j), [`by`](../2i), [`map`](../2i), [`list`](../2b)
49Mold generator. A `jug` is a `map` of `set`.
54 ++ jug |*([a=mold b=mold] (map a (set b)))
68 > =c (my [%a a] [%b b] ~])
70 [n=[p=%b q=[n=4 l={} r={3}]] l={[p=%a q=[n=2 l={1} r={}]]} r={}]
73 [n=4 l=~ r=[n=3 l={} r={}]]
75 > (~(put ju c) [%b 5])
76 [ n=[p=%b q=[n=4 l=[n=5 l={} r={}] r=[n=3 l={} r={}]]]
77 l=[n=[p=%a q=[n=2 l=[n=1 l={} r={}] r=~]] l={} r={}]
84See also: [`ja`](../2j), [`by`](../2i), [`map`](../2i), [`set`](..2h)
91Mold generator. A `map` is a [treap](https://en.wikipedia.org/wiki/Treap) of
98 ++ map |* [a=mold b=mold]
99 %+ cork (tree (pair a b))
100 |= c=(tree (pair a b)) ^+ c
111 > (molt `(list (pair * *))`[[a+1 b+2] ~])
112 [n=[p=[97 1] q=[98 2]] l={} r={}]
117See also: [`by`](../2i)
124Mold generator. An ordered [treap](http://en.wikipedia.org/wiki/Treap) of
130 ++ qeu |*(a=mold (tree a))
141 { a/<1.vyv {* <112.lqf 224.nab 54.tyv 119.veb 31.ohr 1.jmk $143>}>
148 > (~(gas to *(qeu time)) [~2014.1.1 ~2014.1.2 ~])
149 [n=~2014.1.2 l={} r={~2014.1.1}]
154See also: [`qeu`](../2k)
161Mold generator. A `qeu` is an ordered [treap](http://en.wikipedia.org/wiki/Treap) of
177 [n='b' l={'a' 'c'} r={}]
179 > (~(put in (sy "abc")) %d)
180 [n='b' l=[n='d' l={} r={'a' 'c'}] r=~]
182 > (~(put in (sy "abc")) %a)
183 [n='b' l=[n='c' l={'a'} r={}] r=~]
188See also: [`in`](../2h)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list