def edges(&block)
      return to_enum(__callee__) unless block_given?

      children do |v|
        yield self, v
        v.edges(&block)
      end
    end
def edges(&block)
      return to_enum(__callee__) unless block_given?

      children do |v|
        yield self, v
        v.edges(&block)
      end
    end
Iterates over each edge in the tree.

 @yield  [Array<Node>] each connected node pair.
 @return [Enumerator] if no block is given.