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

# det_update(+Map0, ++Key, ?Value, -Map)

Update the value corresponding to a key in a map, aborting if it doesn't exist.

Map0
  A map
Key
  A key to update
Value
  The value corresponding to Key
Map
  The map after updating

## Description

If the key Key already exists in the map Map0, then this predicate updates the corresponding value to be Value, resulting in the map Map. If the key Key is not already in the map, then the predicate aborts with a runtime error.

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

### Fail Conditions

Never fails.

### Resatisfiable

no

## See Also

update / 4, insert / 4, det_insert / 4, set / 4