[ library(m_tree234) | Third Party Libraries | Reference Manual | Alphabetic Index ]
remove_smallest(+Tree0, ?Key, ?Value, -Tree)
Remove the smallest key and its corresponding value from a tree.
- A 2-3-4 tree
- The key removed
- The value corresponding to Key
- The tree after removal
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.
Fails if Tree0 is empty or if Key and Value do not unify with the key and value removed.
remove / 4