def partial_sort!
      unless block_given? then return partial_sort! { |item1, item2| item1 <=> item2 } end
      # The comparison hash
      h = Hash.new { |h, k| h[k] = Hash.new }
      sort! do |a, b|
        # * If a and b are comparable, then use the comparison result.
        # * Otherwise, if there is a member c such that (a <=> c) == (c <=> b),
        #   then a <=> b has the transitive comparison result.
        # * Otherwise, a <=> b is arbitrarily set to 1.
        yield(a, b) || h[a][b] ||= -h[b][a] ||= h[a].detect_value { |c, v| v if v == yield(c, b) } || 1
      end
    end
def partial_sort!
      unless block_given? then return partial_sort! { |item1, item2| item1 <=> item2 } end
      # The comparison hash
      h = Hash.new { |h, k| h[k] = Hash.new }
      sort! do |a, b|
        # * If a and b are comparable, then use the comparison result.
        # * Otherwise, if there is a member c such that (a <=> c) == (c <=> b),
        #   then a <=> b has the transitive comparison result.
        # * Otherwise, a <=> b is arbitrarily set to 1.
        yield(a, b) || h[a][b] ||= -h[b][a] ||= h[a].detect_value { |c, v| v if v == yield(c, b) } || 1
      end
    end
Sorts this collection in-place with a partial sort operator block

 @see #partial_sort
 @yield (see #partial_sort)
 @yieldparam (see #partial_sort)
 @raise [NoMethodError] if this Collection does not support the +sort!+ sort in-place method