function rock(array)
  n = length(array)
    if n > 1 then
      rock(n/2)
      rock(n/2)
    end if
end function