next up previous

4.1 Array Operations

APL was perhaps in many respects the computer language that pioneered the concept of an array as a data object in its own right and not just a cartesian collection of data objects. Operations can be performed on whole arrays, such as

where A, B, and C may all be arrays; for example A, B, and C could all be two dimensional arrays of size 200x300. The meaning of such an operation is C A + B for all 200 values of i and 300 values of j, for a total in this case of 60,000 individual computations involving the array elements. The APL model, therefore, is concurrent element- by-corresponding-element computation for all the elements in the array(s). (Though few implementations of APL capitalized on this conceptual parallelism.)