Maps are a data structure which associates values of the same type to values of the same type. The former are called key and the latter values. Together they make up a binding. An additional requirement is that the type of the keys must be comparable, in the Michelson sense.
As a consequence, the predefined type
map has two parameters: the
first is the type of the keys, and the second the type of the
The empty map is denoted by the predefined value
non-empty map can be built by using the function
takes a list of pairs of key and values, and returns a map containing
them as bindings, and only them.
Map.literal predefined function builds a map from a list of
[<key>, <value>]. Note also the "
," to separate
individual map bindings. Note that
"<string value>" as address means
that we type-cast a string into an address.
Note: See the predefined namespace Map
Note: Map keys are internally sorted by increasing values, so the type of the keys be comparable, that is, they obey a total order (any two keys can be compared).