4,506
edits
mNo edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
* '''Right Identity''', or '''Right''' (<source lang=apl inline>⊢</source>) is [[dyadic]] and returns its right argument. | * '''Right Identity''', or '''Right''' (<source lang=apl inline>⊢</source>) is [[dyadic]] and returns its right argument. | ||
The ''right tack'' glyph <source lang=apl inline>⊢</source>, when used for Right, is almost paired with Identity for the monadic case. ''Left tack'', <source lang=apl inline>⊣</source> is usually used for Identity as well, but may be given a different meaning, such as [[Stop]] in [[SHARP APL]]. | The ''right tack'' glyph <source lang=apl inline>⊢</source>, when used for Right, is almost paired with Identity for the monadic case. ''Left tack'', <source lang=apl inline>⊣</source> is usually used for Identity as well, but may be given a different meaning, such as [[Stop]] (which returns the constant <source lang=apl inline>0 0⍴0</source>) in [[SHARP APL]] and [[APLX]], or [[Hide]] (which returns the constant <source lang=apl inline>0</source> as a [[shy]] result) in [[GNU APL]]. | ||
Identity functions (Identity in particular) may be used like elements of [[APL syntax|syntax]] to break up [[stranding]], or to force a [[shy]] result to be shown. They can also be combined with an array-oriented [[operator]] to perform structural manipulations on arrays. Identity functions are a central feature of [[tacit programming]], in which functions and operators rather than names are used to direct the flow of arguments. The pairing of both Left and Right with monadic Identity makes it easier to design [[ambivalent]] functions which usefully work with one or two arguments. | Identity functions (Identity in particular) may be used like elements of [[APL syntax|syntax]] to break up [[stranding]], or to force a [[shy]] result to be shown. They can also be combined with an array-oriented [[operator]] to perform structural manipulations on arrays. Identity functions are a central feature of [[tacit programming]], in which functions and operators rather than names are used to direct the flow of arguments. The pairing of both Left and Right with monadic Identity makes it easier to design [[ambivalent]] functions which usefully work with one or two arguments. | ||
Line 118: | Line 118: | ||
1 2 3 4 5 6 | 1 2 3 4 5 6 | ||
</source> | </source> | ||
== External links == | |||
=== Tutorials === | |||
* Optima Systems blog: [https://optima-systems.co.uk/left-and-right-tack-in-dyalog-apl/ Left and Right Tack in Dyalog APL] | |||
=== Documentation === | |||
* 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] | |||
{{APL built-ins}} | {{APL built-ins}} |