2,962
edits
(→History: Right date and citation for when SHARP introduced Rank) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
In [[SHARP APL]], [[Rationalized APL]], and [[J]], '''function rank''' refers to a built-in property of a function indicating which argument [[rank]]s it accepts. A function will be applied as though it were given that rank with the [[Rank operator]]. The function rank may also have other observable effects: in [[J]], the ranks of < | In [[SHARP APL]], [[Rationalized APL]], and [[J]], '''function rank''' refers to a built-in property of a function indicating which argument [[rank]]s it accepts. A function will be applied as though it were given that rank with the [[Rank operator]]. The function rank may also have other observable effects: in [[J]], the ranks of <syntaxhighlight lang=apl inline>f</syntaxhighlight> may be viewed using <syntaxhighlight lang=apl inline>f b. 0</syntaxhighlight> and another function <syntaxhighlight lang=apl inline>g</syntaxhighlight> may be given those ranks using <syntaxhighlight lang=apl inline>g"f</syntaxhighlight> (<syntaxhighlight lang=apl inline>"</syntaxhighlight> is the Rank operator). Every language with function rank defines [[Close composition|"close" composition operators]] which inherit the rank of their right operand—the [[derived function]] produced by such a composition has ranks derived from that function's ranks. | ||
== History == | == History == | ||
Function rank was first introduced without being given a name in [[SHARP APL]], as a feature of the compositions [[Over|with]] and [[Atop|over]]. New compositions such as < | Function rank was first introduced without being given a name in [[SHARP APL]], as a feature of the compositions [[Over|with]] and [[Atop|over]]. New compositions such as <syntaxhighlight lang=apl inline>f⍤g</syntaxhighlight> were described as "close in the sense that the expression… is applied individually to each subarray argument of <syntaxhighlight lang=apl inline>g</syntaxhighlight>".<ref>K.E. Iverson. [https://www.jsoftware.com/papers/satn41.htm "Composition and Enclosure"]. SATN 41, 1981-06-20.</ref> The concept of function rank was formalized, and applied to most primitives, when the [[Rank operator]] was introduced in 1983.<ref>[https://www.jsoftware.com/papers/satn45.htm "Language Extensions of May 1983"]. SATN-45, 1983-05-02.</ref> In [[J]] every function, primitive or user-defined, has a function rank. | ||
== Definition and properties == | == Definition and properties == | ||
Line 28: | Line 28: | ||
<references /> | <references /> | ||
{{APL features}}[[Category:Leading axis theory]][[Category:Function characteristics]] |