splay_insert/5

splay_insert(+ Key,? Val,+ Tree,- NewTree)*

Insert item Key in tree Tree, assuming that it is not there already. The variable Val unifies with a value for key Key, and the variable NewTree unifies with the new tree. In our implementation, Key is not inserted if it is already there: rather it is unified with the item already in the tree.