2title = "2o: Normalizing Containers"
9Mold generator. A `jar` is a `map` of `list`.
11Produces the mold of a map from `key` to lists of `value`.
15`key` is a `mold`, and is the type of the map key
17`value` is a `mold`, and is the type of items in the lists. The lists are the values in the map.
26++ jar |$ [key value] (map key (list value))
32> `(jar @t @ud)`(malt ~[['foo' ~[1 2 3]] ['bar' ~[4 5 6]]])
33{[p='bar' q=~[4 5 6]] [p='foo' q=~[1 2 3]]}
38See also: [`ja`](/docs/hoon/reference/stdlib/2j#ja), [`by`](/docs/hoon/reference/stdlib/2i), [`map`](#map), [lists](/docs/hoon/reference/stdlib/2b)
44Mold generator. A `jug` is a `map` of `set`.
46Produces the mold of a map from `key` to sets of `value`.
50`key` is a `mold`, and is the type of the map key.
52`value` is a `mold`, and is the type of items in the sets. The sets are the values in the map.
61++ jug |$ [key value] (map key (set value))
67> `(jug @t @ud)`(malt ~[['foo' (silt ~[1 2 3])] ['bar' (silt ~[4 5 6])]])
68{[p='bar' q={5 6 4}] [p='foo' q={1 2 3}]}
73See also: [`ju`](/docs/hoon/reference/stdlib/2j#ju), [`by`](/docs/hoon/reference/stdlib/2i), [`map`](#map), [`set`](#set)
81Mold generator. A `map` is a [treap](https://en.wikipedia.org/wiki/Treap) of
84Produces the mold of a map from `key` to `value`.
101 $| (tree (pair key value))
102 |=(a=(tree (pair)) ?:(=(~ a) & ~(apt by a)))
114> `(map @t @ud)`(malt ~[['foo' 1] ['bar' 2] ['baz' 3]])
115{[p='bar' q=2] [p='baz' q=3] [p='foo' q=1]}
120See also: [`by`](/docs/hoon/reference/stdlib/2i)
128Mold generator. An ordered [treap](http://en.wikipedia.org/wiki/Treap) of
131Produces the mold of a queue of `item`.
147 |=(a=(tree) ?:(=(~ a) & ~(apt to a)))
153> `(qeu @ud)`(~(gas to *(qeu @ud)) ~[1 2 3 4 5])
159See also: [`+to`](/docs/hoon/reference/stdlib/2k#to)
167Mold generator. A `set` is an unordered [treap](http://en.wikipedia.org/wiki/Treap) of
170Produces the mold of a set of `item`.
186 |=(a=(tree) ?:(=(~ a) & ~(apt in a)))
192> `(set @ud)`(silt ~[1 2 3 4 5])
198See also: [`+in`](/docs/hoon/reference/stdlib/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