[ library(m_tree234) | Reference Manual | Alphabetic Index ]
lookup(+Tree, ++Key, ?Value)
Search a tree for a key.
- A 2-3-4 tree
- A key to search for
- The value corresponding to Key
This predicate searches the tree Tree for an entry with key Key.
If the key is found, then it attempts to unify the corresponding
value with Value. If the key is not found, then it aborts with
a runtime error.
This predicate should only be called with trees created by other
predicates from the tree234 module.
Fails if Value does not unify with the value corresponding to Key.
member / 3, search / 3