kernel/common/array.rb
# Insertion sort in-place between the given indexes using a block.
Insertion sort in-place between the given indexes using a block.
Insertion sort in - place between the given indexes using a block .
def isort_block!(left, right, block)
    i = left + 1
    while i <= right
      j = i
      while j > 0 and block.call(@tuple.at(j - 1), @tuple.at(j)) > 0
        @tuple.swap(j, (j - 1))
        j -= 1
      end
      i += 1
    end
  end
def isort_block! ( left , right , block ) i = left + 1 while i <= right j = i while j > 0 and block . call ( @tuple . at ( j - 1 ) , @tuple . at ( j ) ) > 0 @tuple . swap ( j , ( j - 1 ) ) j -= 1 end i += 1 end end
Insertion sort in-place between the given indexes using a block.
Insertion sort in - place between the given indexes using a block .
left
<not_specific>
right
<not_specific>
block
<not_specific>