2o: Normalizing Containers
+jar
+jar$mold generator. A +jar is a +map of +list.
Produces the $mold of a +map from key to lists of value.
Accepts
$key is a $mold, and is the type of the +map key.
$value is a $mold, and is the type of items in the lists. The lists are the values in the +map.
Produces
A $mold.
Source
++ jar |$ [key value] (map key (list value))Examples
> `(jar @t @ud)`(malt ~[['foo' ~[1 2 3]] ['bar' ~[4 5 6]]])
{[p='bar' q=~[4 5 6]] [p='foo' q=~[1 2 3]]}Discussion
See also: +ja, +by, +map, +lists.
+jug
+jug$mold generator. Produces a +jug, which is a (map key (set value)).
Accepts
$key is a $mold, and is the type of the +map key.
$value is a $mold, and is the type of items in the +sets. The +sets are the values in the +map.
Produces
A $mold.
Source
Examples
Discussion
See also: +ju, +by, +map, +set.
+map
+mapA +map is a treap of key-value pairs.
Produces the $mold of a +map from key to value.
Accepts
$key is a $mold.
$value is a $mold.
Produces
A $mold.
Source
Examples
Discussion
See also: +by.
+qeu
+qeuQueue.
$mold generator. An ordered treap of items.
Produces the $mold of a queue of $item.
Accepts
$item is a $mold.
Produces
A $mold.
Source
Examples
Discussion
See also: +to.
+set
+setSet.
$mold generator. A +set is an unordered treap of items.
Produces the $mold of a +set of $item.
Accepts
$item is a $mold.
Produces
A $mold.
Source
Examples
Discussion
See also: +in.
Last updated