S9 LIB  (make-array integer ...)                           ==>  array
        (array object ...)                                 ==>  array
        (array? object)                                    ==>  boolean
        (array-dimensions array)                           ==>  list
        (array-map procedure array ...)                    ==>  array
        (array-rank array)                                 ==>  integer
        (array-ref array integer ...)                      ==>  object
        (array-set! array integer ... object)              ==>  unspecific
        (subarray array (list integer1,1 integer1,2) ...)  ==>  array

        (load-from-library "array.scm")

MAKE-ARRAY creates a new array whose rank (number of dimensions)
equals the number of integers specified. Each integer specifies
the size of one dimension, e.g.: (make-array 2 3 4) creates an
array with two elements in the first dimensions, three in the
second and four in the third.

ARRAY creates a fresh array of rank one and stores the given
elements in it. Arrays of higher rank can be created by nesting
applications of ARRAY.

(Array? x) returns #T if X is an array and otherwise #F. The array
is a subtype of the vector, so (vector? x) follows from (array? x).

ARRAY-DIMENIONS returns a list of the dimensions of the given
ARRAY. For a zero-dimensional array it returns ().

ARRAY-MAP maps a procedure over the elements of the given arrays.
The arity of PROCEDURE must match the number of ARRAYs. ARRAY-MAP
returns a new array in which the elements of the input arrays have
been tuple-wise combined with PROCEDURE, e.g.:

(new1,1 ... new1,N  =  ((P a1,1,1 ... aK,1,1) ... (P a1,1,N aK,1,N)
 ...                    ...
 newM,1 ... newM,N)     (P a1,M,1 ... aK,M,1) ... (P a1,M,N aK,M,N))

where K is the number of arrays, P is the procedure, M is the number
of rows and N is the number of columns of a matrix. When more than
two dimensions are involved the number of parameters grows accordingly.

ARRAY-RANK returns the number of dimensions of the given ARRAY.
Note that a one-dimensional array with one element has a rank
of 0.

(Array-ref a i1 ... iN) returns element <i1,...,iN> of the array A.
N must be equal to the rank of A.

(Array-set! a i1 ... iN v) sets element <i1,...,iN> of the array A
to the value V. N must be equal to the rank of A.

SUBARRAY creates a fresh array with the same rank as the given ARRAY
and copies the specified elements to the new array. Each INTEGER1
specifies the first element to copy from the corresponding dimension
and INTEGER2 specifies the first element not to copy. The dimensions
of the new array are
(INTEGER1,2)-(INTEGER1,1) ... (INTEGERn,2)-(INTEGERn,1)
where N is the rank of the array.

(let ((a (make-array 3 3 3)))
  (array-set! a 1 1 1 'foo)
  (array-ref a 1 1 1))            ==>  foo

(let ((a (array (array 1 2 3 4)
                (array 3 4 5 6)
                (array 5 6 7 8))))
  (list (array-rank a)
        (array-dimensions a)))    ==>  (2 (3 4))
