def direction_intersect(other_set)
      self.class.new.tap do |memo|
        unless other_set.keys.empty?
          a(memo, other_set)
          b(memo, other_set)
        end
        c(memo)
        d(memo, other_set)
      end
    end
def direction_intersect(other_set)
      self.class.new.tap do |memo|
        unless other_set.keys.empty?
          a(memo, other_set)
          b(memo, other_set)
        end
        c(memo)
        d(memo, other_set)
      end
    end
Returns a new array containing elements common to the two arrays,
 excluding any duplicates.

 Any matching keys at matching indexes with the same order will have the
 order reversed.

   a = Sorted::Set.new([['email', 'asc'], ['name', 'asc']])
   b = Sorted::Set.new([['email', 'asc'], ['phone', 'asc']])
   s = a.direction_intersect(b)
   s.to_a #=> [['email', 'desc'], ['phone', 'asc'], ['name', 'asc']]