[ library(m_map) | Reference Manual | Alphabetic Index ]
remove_smallest(+Map0, ?Key, ?Value, -Map)
Remove the smallest key and its corresponding value from a map.
- A map
- The key removed
- The value corresponding to Key
- The map after removal
Removes the smallest key in the map Map0 (resulting in the
map Map), and attempts to unify the removed key with Key and
its corresponding value with Value.
This predicate should only be called with maps created by other
predicates from the map module.
Fails if Map0 is empty or if Key and Value do not unify with the key and value removed.
remove / 4