2,951
edits
m (Text replacement - "{{APL built-ins}}" to "{{APL built-ins}}Category:Primitive functions") |
(→Documentation: BQN link) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
|<code>⊣</code> <code>⊢</code> | |<code>⊣</code> <code>⊢</code> | ||
|} | |} | ||
:''This page is about the class of primitive functions. For the result of an empty reduction, see [[Identity element]].'' | |||
An '''Identity function''', or '''tack function''', is one of the three [[primitive function]]s which returns one of its [[argument]]s with no modification: | An '''Identity function''', or '''tack function''', is one of the three [[primitive function]]s which returns one of its [[argument]]s with no modification: | ||
* '''Identity''', '''Same''', or '''Pass''' (<source lang=apl inline>⊣</source> or <source lang=apl inline>⊢</source>) is [[monadic]] and returns its only argument. | * '''Identity''', '''Same''', or '''Pass''' (<source lang=apl inline>⊣</source> or <source lang=apl inline>⊢</source>) is [[monadic]] and returns its only argument. | ||
Line 46: | Line 47: | ||
¯7 | ¯7 | ||
</source> | </source> | ||
The mirror image—using only the left argument while ignoring the | The mirror image—using only the left argument while ignoring the right—is attained by using [[Atop]] (either the operator, or a 2-train) with Left as the right operand. | ||
<source lang=apl> | <source lang=apl> | ||
2 -⍤⊣ 7 | 2 -⍤⊣ 7 | ||
Line 126: | Line 127: | ||
* Dyalog: [https://help.dyalog.com/17.1/Content/Language/Symbols/Left%20Tack.htm Left Tack], [https://help.dyalog.com/17.1/Content/Language/Symbols/Right%20Tack.htm Right Tack] | * Dyalog: [https://help.dyalog.com/17.1/Content/Language/Symbols/Left%20Tack.htm Left Tack], [https://help.dyalog.com/17.1/Content/Language/Symbols/Right%20Tack.htm Right Tack] | ||
* APLX: [http://microapl.com/apl_help/ch_020_020_754.htm Left], [http://microapl.com/apl_help/ch_020_020_756.htm Right], [http://microapl.com/apl_help/ch_020_020_755.htm Pass] | * APLX: [http://microapl.com/apl_help/ch_020_020_754.htm Left], [http://microapl.com/apl_help/ch_020_020_756.htm Right], [http://microapl.com/apl_help/ch_020_020_755.htm Pass] | ||
* [https://mlochbaum.github.io/BQN/doc/identity.html BQN] | |||
{{APL built-ins}}[[Category:Primitive functions]] | {{APL built-ins}}[[Category:Primitive functions]] |