Pair: Difference between revisions

Jump to navigation Jump to search
177 bytes added ,  15:34, 14 July 2020
(Created page with "{{Built-in|Pair|⍮}} is a primitive function equivalent to the dfn <source lang=apl inline>{⍺←,⊂ ⋄ ⍺ ⍵}</source> which aids in constructing nested arrays...")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Built-in|Pair|⍮}} is a [[primitive function]] equivalent to the [[dfn]] <source lang=apl inline>{⍺←,⊂ ⋄ ⍺ ⍵}</source> which aids in constructing nested arrays during [[tacit programming]] where [[stranding]] by juxtaposition is not available. It is also equivalent to <source lang=apl inline>,⍥⊂</source> using the [[Over operator]] or <source lang=apl inline>,⍨∘⊂⍨∘⊂</source> using only traditional operators. It was introduced in [[Extended Dyalog APL]], and then adopted into [[dzaima/APL]].
{{Built-in|Pair|⍮}} or '''Juxtapose''' is a [[primitive function]] equivalent to the [[dfn]] <source lang=apl inline>{⍺←,⊂ ⋄ ⍺ ⍵}</source> which aids in constructing nested arrays during [[tacit programming]] where [[stranding]] by juxtaposition is not available. It is also equivalent to the [[catenate|catenation]] of the [[enclose]]d arguments; <source lang=apl inline>,⍥⊂</source> using the [[Over operator]] or <source lang=apl inline>,⍨∘⊂⍨∘⊂</source> using only the traditional operators [[Commute]] and [[Compose]]. It was introduced in [[Extended Dyalog APL]], and then adopted into [[dzaima/APL]].


== Common usage ==
== Common usage ==
Line 13: Line 13:
{{Works in|[[dzaima/APL]], [[Extended Dyalog APL]]}}
{{Works in|[[dzaima/APL]], [[Extended Dyalog APL]]}}


It can also be combined with [[Mix]] to increase rank rather than depth:
It can also be combined with [[Mix]] to increase [[rank]] rather than [[depth]]:


[https://tio.run/##SyzI0U2pSszMTfz//1Hf1EdtE8wUzBUsNLQftU181LvkUe86XU3j//8B Try it online!]
[https://tio.run/##SyzI0U2pSszMTfz//1Hf1EdtE8wUzBUsNLQftU181LvkUe86XU3j//8B Try it online!]
Line 22: Line 22:
</source>
</source>
{{Works in|[[dzaima/APL]], [[Extended Dyalog APL]]}}
{{Works in|[[dzaima/APL]], [[Extended Dyalog APL]]}}
 
=== See also ===
{{APL built-ins}}
* [[Link]]
{{APL built-ins}}[[Category:Primitive functions]]

Navigation menu