[ library(m_map) | Reference Manual | Alphabetic Index ]

remove(+Map0, ++Key, ?Value, -Map)

Remove a key/value pair from a map, failing if the key is not present.
Map0
A map
Key
The key to remove
Value
The value corresponding to Key
Map
The map after removal

Description

If the key Key appears in the map Map0, then remove it and attempt to unify its corresponding value with Value. Map is Map0 with the key removed.

This predicate should only be called with maps created by other predicates from the map module.

Fail Conditions

Fails is Key does not appear in Map0 or if Value does not unify with the corresponding value.

Resatisfiable

no

See Also

delete / 3, det_remove / 4, remove_smallest / 4