3 + (u=. 12 : t) ^. 4 12 u õýýýýýýýýýýýýýýýýýÃýÃýýÀ þõýýýýýýýýýýÃýÃýýÀþ&þ].þ þþõýýÃýýÃýýÀþ@þ[.þþ þ þ þþþ].þ^:þ_1þþ þ þþ þ þ þþÁýýÂýýÂýýãþ þ þþ þ þ þÁýýýýýýýýýýÂýÂýýãþ þ þ ÁýýýýýýýýýýýýýýýýýÂýÂýýã ]. ^: _1 @ [. & ]. Exercises: 20.1 Use the display of the tacit definition of MEAN to define an equivalent function called M. ANSWER: M=. +/ % # 21: 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 $report 3 4 5 2 4 3 6 7 8 #report 9 10 11 2 #@$report 12 13 14 3 15 16 17 18 19 20 21 22 23 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 <@i."0 s õýýýýýýýýýÀ õýýýÃýýýýýýýýýÀ þ0 1 2 3 4þ þ0 1þ0 1 2 3 4þ þ5 6 7 8 9þ ÁýýýÂýýýýýýýýýã Áýýýýýýýýýã Both the left and right ranks of a dyad may be specified. Thus: i,"0 1 i=.0 1 2 i,"1 1 i 0 0 1 2 0 1 2 0 1 2 1 0 1 2 ,"1~i 2 0 1 2 0 1 2 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 _ _ 1 _ Exercises: 21.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