Close composition: Difference between revisions

Jump to navigation Jump to search
520 bytes added ,  22:26, 10 September 2022
m
Text replacement - "</source>" to "</syntaxhighlight>"
(Created page with "In SHARP APL and J, a '''close composition''' is one of the operators Atop (operator), Over, or Under, defined so that the overall result has functi...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
In [[SHARP APL]] and [[J]], a '''close composition''' is one of the [[operator]]s [[Atop (operator)|Atop]], [[Over]], or [[Under]], defined so that the overall result has [[function rank]] equal to the right operand. 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 APLs) are provided.
In [[SHARP APL]] and [[J]], a '''close composition''' is one of the [[operator]]s [[Atop (operator)|Atop]], [[Over]], or [[Under]], defined so that the overall result has [[function rank]] equal to the right operand. 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.


{|class=wikitable
{|class=wikitable
! Operator !! SHARP !! J close !! J non-close
! Operator !! SHARP !! J close !! J non-close !! Modern
|-
|-
| [[Atop (operator)|Atop]] || <code>⍥</code> || <code>@</code>  || <code>@:</code>
| [[Atop (operator)|Atop]] || <syntaxhighlight lang=apl inline>⍥</syntaxhighlight> || <syntaxhighlight lang=j inline>@</syntaxhighlight>  || <syntaxhighlight lang=j inline>@:</syntaxhighlight> || <syntaxhighlight lang=apl inline>⍤</syntaxhighlight>
|-
|-
| [[Over]]                || <code>⍤</code> || <code>&</code>  || <code>&:</code>
| [[Over]]                || <syntaxhighlight lang=apl inline>⍤</syntaxhighlight> || <syntaxhighlight lang=j inline>&</syntaxhighlight>  || <syntaxhighlight lang=j inline>&:</syntaxhighlight> || <syntaxhighlight lang=apl inline>⍥</syntaxhighlight>
|-
|-
| [[Under]]                || <code>¨</code> || <code>&.</code> || <code>&.:</code>
| [[Under]]                || <syntaxhighlight lang=apl inline>¨</syntaxhighlight> || <syntaxhighlight lang=j inline>&.</syntaxhighlight> || <syntaxhighlight lang=j inline>&.:</syntaxhighlight> || <syntaxhighlight lang=apl inline>⍢</syntaxhighlight>
|}
|}


{{APL built-ins}}[[Category:Composition operators]]
{{APL features}}[[Category:Composition operators]]

Navigation menu