Atop (operator): Difference between revisions

Jump to navigation Jump to search
1,145 bytes added ,  23:37, 19 June 2022
m
→‎Explanation: added missing parenthesis
(Close composition (SHARP/J) section)
m (→‎Explanation: added missing parenthesis)
(2 intermediate revisions by one other user not shown)
Line 8: Line 8:
When the resulting function is used [[dyadic]]ally, the result is post-processed:
When the resulting function is used [[dyadic]]ally, the result is post-processed:
{|
{|
|<source lang=apl>⍺ (g ⍤ h) ⍵</source>|| {{←→}} ||<source lang=apl>g ⍺ h ⍵)</source>
|<source lang=apl>⍺ (g ⍤ h) ⍵</source>|| {{←→}} ||<source lang=apl>g (⍺ h ⍵)</source>
|}
|}


Line 25: Line 25:


In [[SHARP APL]] and [[J]], Atop is implemented as a [[close composition]], meaning that (using SHARP syntax) <source lang=apl inline>f⍥g</source> has the overall [[function rank]] of <source lang=apl inline>g</source>. J uses <code>@</code> for the close form and <code>@:</code> for the rankless form that appears in modern APLs.
In [[SHARP APL]] and [[J]], Atop is implemented as a [[close composition]], meaning that (using SHARP syntax) <source lang=apl inline>f⍥g</source> has the overall [[function rank]] of <source lang=apl inline>g</source>. J uses <code>@</code> for the close form and <code>@:</code> for the rankless form that appears in modern APLs.
== History ==
Atop was defined as subordinate to [[Over]] in [[Ken Iverson]]'s 1978 paper [[Operators and Functions]]: that is, the derived function <source lang=apl inline>f¨g</source> works as an Atop if <source lang=apl inline>f</source> is strictly monadic or (in the dyadic case) <source lang=apl inline>g</source> is strictly dyadic. He called it Composition, as there was no [[Atop operator]]. It was added to [[SHARP APL]] as a [[close composition]] with glyph <source lang=apl inline>⍥</source> and name "upon" (initially "over"), with a limited implementation in 1981<ref>[https://www.jsoftware.com/papers/satn41.htm "Composition and Enclosure"]. SATN-41, 1981-06-20.</ref> followed by a full implementation in 1983 with the introduction of [[function rank]].<ref>[https://www.jsoftware.com/papers/satn45.htm "Language Extensions of May 1983"]. SATN-45, 1983-05-02.</ref> The name "Atop" was introduced by [[J]] (which uses "At" for its non-close form). The glyph <source lang=apl inline>⍤</source> was chosen for [[Dyalog APL 18.0]], shared with the [[Rank operator]].


== External links ==
== External links ==
Line 32: Line 36:
* [https://help.dyalog.com/latest/#Language/Primitive%20Operators/Atop.htm Dyalog]
* [https://help.dyalog.com/latest/#Language/Primitive%20Operators/Atop.htm Dyalog]
* J [https://www.jsoftware.com/help/dictionary/d632.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/atco NuVoc]
* J [https://www.jsoftware.com/help/dictionary/d632.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/atco NuVoc]
* [https://mlochbaum.github.io/BQN/doc/compose.html BQN]
{{APL built-ins}}[[Category:Primitive operators]][[Category:Composition operators]]
{{APL built-ins}}[[Category:Primitive operators]][[Category:Composition operators]]
2

edits

Navigation menu