Close composition
Jump to navigation
Jump to search
In SHARP APL and J, a close composition is one of the operators Atop, Over, or Under, defined so that the overall result has function rank equal to the right operand. "Close" is meant in the sense of distance; the left operand is applied nearer to the right operand relative to the corresponding rankless composition, in the sense that it is immediately applied to the result of each individual application of the right operand, as opposed to after the assembly of the right-operand results.[1][2] In SHARP all composition operators follow this pattern, while in J, both close and non-close forms (with a result rank of infinity, matching the definition in most modern APLs) are provided.
Operator | SHARP | J close | J non-close | Modern APL |
---|---|---|---|---|
Atop | ⍥ |
@ |
@: |
⍤
|
Over | ⍤ |
& |
&: |
⍥
|
Under | ¨ |
&. |
&.: |
⍢
|
APL features [edit] | |
---|---|
Built-ins | Primitives (functions, operators) ∙ Quad name |
Array model | Shape ∙ Rank ∙ Depth ∙ Bound ∙ Index (Indexing) ∙ Axis ∙ Ravel ∙ Ravel order ∙ Element ∙ Scalar ∙ Vector ∙ Matrix ∙ Simple scalar ∙ Simple array ∙ Nested array ∙ Cell ∙ Major cell ∙ Subarray ∙ Empty array ∙ Prototype |
Data types | Number (Boolean, Complex number) ∙ Character (String) ∙ Box ∙ Namespace ∙ Function array |
Concepts and paradigms | Conformability (Scalar extension, Leading axis agreement) ∙ Scalar function (Pervasion) ∙ Identity element ∙ Complex floor ∙ Array ordering (Total) ∙ Tacit programming (Function composition, Close composition) ∙ Glyph ∙ Leading axis theory ∙ Major cell search ∙ First-class function |
Errors | LIMIT ERROR ∙ RANK ERROR ∙ SYNTAX ERROR ∙ DOMAIN ERROR ∙ LENGTH ERROR ∙ INDEX ERROR ∙ VALUE ERROR ∙ EVOLUTION ERROR |
- ↑ K.E. Iverson. Operators and Functions. §8 Composition and Duality. Research Report RC-7091. IBM Watson Research Center. 1978-04-26.
- ↑ K.E. Iverson. Rationalized APL. §I. New Operators. Research Report 1. I.P. Sharp Associates. 1983-04-04.