Rank is a generalization of looping as used in scalar (non-array-oriented) programming languages.
[1][2] It is also a generalization of mapcar in the language Lisp[3] and map in modern functional programming languages, and a generalization of scalar extension, inner (matrix) product, and outer product in APL\360.
The canonical implementation of rank may be the language J, but it is also available in Dyalog APL, the International Organization for Standardization (ISO) technical standard on Extended APL, and NARS2000.
In general, the concept of rank is used to treat an orthogonal array in terms of its subarrays.
Understanding rank requires knowing some very basic array-oriented programming concepts.
In most array-based languages, reduction is denoted with a forward slash /.
This application of +/ to a two-dimensional array corresponds to the C code fragment:[5] Suppose we wanted to add up the items of each row, as in the C code fragment: To produce the result 3 12.
It is common to refer to the lower-dimensional arrays by these names,[6] though they are disputed sometimes.
In degenerate cases, where the arguments do not have sufficient dimensions, the rank of the verb is effectively reduced (which would influence its result).
The body of this verb ignores the values of any arguments and always produces a result which is that noun.