code: func (t *Tree) TraverseDFS(node string, each func(RDFGraph, string, int) error, depths ...int) error {
  	var depth int
  	if len(depths) > 0 {
  		depth = depths[0]
  	}
  
  	if err := each(t.g, node, depth); err != nil {
  		return err
  	}
  
  	triples := t.g.WithSubjPred(node, t.predicate)
  
  	var childs []string
  	for _, tri := range triples {
  		n, ok := tri.Object().Resource()
  		if !ok {
  			return fmt.Errorf("object is not a resource identifier")
  		}
  		childs = append(childs, n)
  	}
  
  	sort.Strings(childs)
  
  	for _, child := range childs {
  		t.TraverseDFS(child, each, depth+1)
  	}
  
  	return nil
  }
docs: // Traverse the tree in pre-order depth first search