trees :: BinTreeMap :: search_down
key
in from
and its children nodes.
# Search `key` in `from` and its children nodes.
protected fun search_down(from: N, key: nullable Object): nullable N do
if not key isa Comparable then return null
var cmp = key <=> from.key
if cmp == 0 then return from
if from.left != null and cmp < 0 then
return search_down(from.left.as(not null), key)
else if from.right != null then
return search_down(from.right.as(not null), key)
end
return null
end
lib/trees/bintree.nit:97,2--108,4