Reference

Map

Constructor

Input A list of pairs separated by comma.
Output A map containing all the pairs.

Signature

Example

Index

Input A map and a key.
Output The value associated with the key.

Signature

Example

At

Input A map and a hashable key.
Output The value associated with the key.

Signature

Example

Keys

Input A map.
Output A list containing all the keys.

Signature

Example

Values

Input A map.
Output A list containing all the values.

Signature

Example

Entries

Input A map.
Output A list of key-value pairs as two-element lists.

Signature

Example

Set

Input A map, a hashable key, and a value.
Output A new map containing the new key-value pair.

Signature

Example

Merge

Input Two maps.
Output A new map containing all key-value pairs from both maps. When both maps contain the same key, the value from the second map takes precedence.

Signature

Example

Remove at

Input A map and a hashable key.
Output A new map with the key removed.

Signature

Example

Contains key

Input A map and a hashable key.
Output True if the key is in the map, false otherwise.

Signature

Example

Is empty

Input A map.
Output True if the map is empty, false otherwise.

Signature

Example

Is not empty

Input A map.
Output True if the map is not empty, false otherwise.

Signature

Example

Length

Input A map.
Output The number of key-value pairs in the map.

Signature

Example