chickadee » generalized-arrays » array-ref

array-ref array idxprocedure

Gets the element at idx in the array.

 
(import generalized-arrays
        test)

(define a
  (make-array-from-storage
    vector-storage-class
    (vector 3 3)
    (vector 1 2 3
            4 5 6
            7 8 9)))

(test "Element at #(1 1) is equal to 5"
      5
      (array-ref a #(1 1)))