;;; -*- logo -*-
;; This is offered as part of the sound API.
;;
;; copyright University of Victoria, 2005

to reversearray :arr1
  local [arr2]
  make "arr2 (array count arr1 0)

  make "i 0
  make "j (count arr1) - 1
  repeat count arr1 [
    setitem i arr2 item j arr1
    make "i i+1
    make "j j-1
  ]

  output arr2

end
