code: func (d *doubleIter) compare() (s comparison, err error) {
  	s.sameHash = d.hashEqual(d.from.current, d.to.current)
  
  	fromIsDir := d.from.current.IsDir()
  	toIsDir := d.to.current.IsDir()
  
  	s.bothAreDirs = fromIsDir && toIsDir
  	s.bothAreFiles = !fromIsDir && !toIsDir
  	s.fileAndDir = !s.bothAreDirs && !s.bothAreFiles
  
  	fromNumChildren, err := d.from.current.NumChildren()
  	if err != nil {
  		return comparison{}, fmt.Errorf("from: %s", err)
  	}
  
  	toNumChildren, err := d.to.current.NumChildren()
  	if err != nil {
  		return comparison{}, fmt.Errorf("to: %s", err)
  	}
  
  	s.fromIsEmptyDir = fromIsDir && fromNumChildren == 0
  	s.toIsEmptyDir = toIsDir && toNumChildren == 0
  
  	return
  }
docs: // Compare returns the comparison between the current elements in the
  // merkletries.