>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Voc  !:  Help  Dictionary

20. Rank

The shape (\$), tally (#), and rank (#@\$), of a noun are illustrated by the noun report , which may be construed as a report covering two years of four quarters of three months each:
```   ]report=: i. 2 4 3
0  1  2
3  4  5
6  7  8
9 10 11

12 13 14
15 16 17
18 19 20
21 22 23

(\$ ; # ; #@\$) report        Shape, Number of items, Rank
+-----+-+-+
|2 4 3|2|3|
+-----+-+-+
```
The last k axes determine a k-cell of a noun; the 0-cells of report are the atoms (such as 4 and 14), the 1-cells are the three-element quarterly reports, and the two-cells (or major cells or items) are the two four-by-three yearly reports.

The rank conjunction " is used in the phrase f"k to apply a function f to each of the k-cells of its argument. For example:
```   ,report
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

,"2 report
0  1  2  3  4  5  6  7  8  9 10 11
12 13 14 15 16 17 18 19 20 21 22 23

<@i. s=: 2 5
+---------+
|0 1 2 3 4|
|5 6 7 8 9|
+---------+
<@i."0 s
+---+---------+
|0 1|0 1 2 3 4|
+---+---------+
```
Both the left and right ranks of a dyad may be specified. Thus:
```   10 11 12 (,"0 1 ; ,"1 1 ; ,"1) 0 1 2
+--------+--------------+--------------+
|10 0 1 2|10 11 12 0 1 2|10 11 12 0 1 2|
|11 0 1 2|              |              |
|12 0 1 2|              |              |
+--------+--------------+--------------+
```
The basic characteristics adverb b. is very useful in analyzing functions (or expressions that define them) with respect to their ranks. For example:
```   (# b. 0) ; (+/\ b. 0) ; (+/\ % #) b. 0
+-----+-----+-----+
|_ 1 _|_ 0 _|_ _ _|
+-----+-----+-----+
```

Exercises

 20.1 Observe the results of the following uses of the monads produced by the rank conjunction, and comment on them: ```a=: i. 3 4 5 <"0 a <"1 a <"2 a <"3 a < a <"_1 a <"_2 a mean=: +/ % # mean a mean"1 a mean"2 a ``` Answer: <"k applies < to each cell of rank k , with <"(#\$a) a being equivalent to

>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Voc  !:  Help  Dictionary