[ library(m_tree234) | Reference Manual | Alphabetic Index ]
remove_smallest(+Tree0, ?Key, ?Value, -Tree)
Remove the smallest key and its corresponding value from a tree.
- Tree0
- A 2-3-4 tree
- Key
- The key removed
- Value
- The value corresponding to Key
- Tree
- The tree after removal
Description
Removes the smallest key in the tree Tree0 (resulting in the
tree Tree), and attempts to unify the removed key with Key and
its corresponding value with Value.
This predicate should only be called with trees created by other
predicates from the tree234 module.
Fail Conditions
Fails if Tree0 is empty or if Key and Value do not unify with the key and value removed.
Resatisfiable
no
See Also
remove / 4