public void foreachUp(Consumer<? super BaseType> f) {
        f.accept((BaseType) this);
        children().forEach(c -> c.foreach(f));
    }
Runs the given function recursively on [[children]] then on this node.

@param f the function to be applied to each node in the tree.
indexr-query-opt/src/main/java/io/indexr/query/TreeNode.java