code: public Object depthFirst(NodeVisitor nodeVisitor, Node root) {
          return depthFirst(nodeVisitor, Collections.singleton(root));
      }
docs: depthFirst traversal with a enter/leave phase.
  
  @param nodeVisitor the visitor of the nodes
  @param root        the root node
  
  @return the accumulation result of this traversal