Binary tree get operation #
In this file we define Tree.indexOf
, Tree.get
, and Tree.getOrElse
.
These definitions were moved from the main file to avoid a dependency on Num
.
References #
Finds the index of an element in the tree assuming the tree has been constructed according to the provided decidable order on its elements. If it hasn't, the result will be incorrect. If it has, but the element is not in the tree, returns none.