Implementation of a lazy tree (nodes are created just-in-time on search).