- apply_to_list(++KeyList, +Map, ?ValueList)
- Map a list of keys to their corresponding values.
- contains(+Map, ++Key)
- Check whether a map contains a key.
- count(+Map, ?Count)
- Count the number of elements in a map.
- delete(+Map0, ++Key, -Map)
- Delete a key/value pair from a map.
- delete_list(+Map0, ++KeyList, -Map)
- Delete a list of key/value pairs from a map.
- det_insert(+Map0, ++Key, ?Value, -Map)
- Insert a key/value pair into a map, aborting if the key already exists.
- det_insert_from_assoc_list(+Map0, +List, -Map)
- Insert key/value pairs into a map, aborting if any of the keys already exist.
- det_insert_from_corresponding_lists(+Map0, ++KeyList, ?ValueList, -Map)
- Insert key/value pairs into a map, aborting if any of the keys already exist.
- det_remove(+Map0, ++Key, ?Value, -Map)
- Remove a key/value pair from a map, aborting if the key is not present.
- det_update(+Map0, ++Key, ?Value, -Map)
- Update the value corresponding to a key in a map, aborting if it doesn't exist.
- from_assoc_list(+AssocList, -Map)
- Converts an association list into a map.
- from_corresponding_lists(++KeyList, ?ValueList, -Map)
- Converts a corresponding pair of lists into a map.
- from_sorted_assoc_list(+AssocList, -Map)
- Converts a sorted association list into a map.
- init(-Map)
- Initialise a new (empty) map.
- insert(+Map0, ++Key, ?Value, -Map)
- Insert a key/value pair into a map, failing if the key already exists.
- inverse_search(+Map, ?Value, ?Key)
- Search a map for a value.
- is_empty(+Map)
- Check whether a map is empty.
- keys(+Map, -KeyList)
- Return all the keys from a map.
- lookup(+Map, ++Key, ?Value)
- Search a map for a key.
- lower_bound_lookup(+Map, ++SearchKey, ?Key, ?Value)
- Search a map for the smallest key no smaller than SearchKey.
- lower_bound_search(+Map, ++SearchKey, ?Key, ?Value)
- Search a map for the smallest key no smaller than SearchKey.
- member(+Map, ?Key, ?Value)
- Succeeds if Key and Value unify with a key/value pair from Map.
- merge(+MapA, +MapB, -Map)
- Merges two maps into one.
- optimize(+Map0, -Map)
- Optimize a map for many lookups but few/no modification.
- overlay(+MapA, +MapB, -Map)
- Overlays one map over another.
- remove(+Map0, ++Key, ?Value, -Map)
- Remove a key/value pair from a map, failing if the key is not present.
- remove_smallest(+Map0, ?Key, ?Value, -Map)
- Remove the smallest key and its corresponding value from a map.
- search(+Map, ++Key, ?Value)
- Search a map for a key.
- select(+Map0, ++KeyList, -Map)
- Creates a new map containing just those entries corresponding to a given list of keys.
- set(+Map0, ++Key, ?Value, -Map)
- Update the value corresponding to a key in a map, inserting the key if it doesn't exist already.
- sorted_keys(+Map, -KeyList)
- Return all the keys from a map, in sorted order.
- to_assoc_list(+Map, -AssocList)
- Converts a map into an association list.
- to_sorted_assoc_list(+Map, -AssocList)
- Converts a map into a (sorted) association list.
- update(+Map0, ++Key, ?Value, -Map)
- Update the value corresponding to a key in a map.
- upper_bound_lookup(+Map, ++SearchKey, ?Key, ?Value)
- Search a map for the largest key no larger than SearchKey.
- upper_bound_search(+Map, ++SearchKey, ?Key, ?Value)
- Search a map for the largest key no larger than SearchKey.
- values(+Map, -ValueList)
- Return all the values from a map.
This module provides the `map' abstract data type. A map, also known as a dictionary or an associative array, is a collection of key/value pairs which allows you to look up any data item given its key.
Note that keys must be ground, but values are allowed to be variables.