— Procedure: **array-map!**` array0 proc array1 ...`

array1, ... must have the same number of dimensions asarray0and have a range for each index which includes the range for the corresponding index inarray0.procis applied to each tuple of elements ofarray1... and the result is stored as the corresponding element inarray0. The value returned is unspecified. The order of application is unspecified.

— Function: **array-map**` prototype proc array1 array2 ...`

array2, ... must have the same number of dimensions asarray1and have a range for each index which includes the range for the corresponding index inarray1.procis applied to each tuple of elements ofarray1,array2, ... and the result is stored as the corresponding element in a new array of typeprototype. The new array is returned. The order of application is unspecified.

— Function: **array-for-each**` proc array0 ...`

procis applied to each tuple of elements ofarray0... in row-major order. The value returned is unspecified.

— Function: **array-indexes**` array`

Returns an array of lists of indexes for

arraysuch that, ifliis a list of indexes for whicharrayis defined, (equal?li(apply array-ref (array-indexesarray)li)).

— Function: **array-index-for-each**` array proc`

applies

procto the indices of each element ofarrayin turn. The value returned and the order of application are unspecified.One can implement

array-index-map!as(define (array-index-map! ra fun) (array-index-for-each ra (lambda is (apply array-set! ra (apply fun is) is))))

— Procedure: **array-index-map!**` array proc`

applies

procto the indices of each element ofarrayin turn, storing the result in the corresponding element. The value returned and the order of application are unspecified.One can implement

array-indexesas(define (array-indexes array) (let ((ra (apply make-array '#() (array-dimensions array)))) (array-index-map! ra (lambda x x)) ra))Another example:

(define (apl:index-generator n) (let ((v (make-vector n 1))) (array-index-map! v (lambda (i) i)) v))