4,509
edits
m (→Fractions: Make the fractions smaller) |
No edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Tacit functions apply to implicit arguments | Tacit functions apply to implicit arguments. This is in contrast to the explicit use of arguments in [[dfns]] (<source inline lang=apl>⍺ ⍵</source>) and [[tradfns]] (which have named arguments). Some APL dialects allow to combine functions into '''trains''' following a small set of rules. This allows creating complex derived functions without specifying any arguments explicitly. | ||
Known dialects which implement trains are [[Dyalog APL]], [[dzaima/APL]], [[ngn/apl]] and [[NARS2000]]. | |||
== Primitives == | == Primitives == | ||
Line 53: | Line 55: | ||
|} | |} | ||
Only [[dzaima/APL]] allows <source lang=apl inline>(A h)</source>, which it treats as <source lang=apl inline>A∘h</source>.<ref>dzaima/APL: [https://github.com/dzaima/APL/blob/ceea05e25687988ed0980a4abf4b9249b736543f/docs/differences.txt#L19 Differences from Dyalog APL]. Retrieved 09 Jan 2020.</ref> | Only [[dzaima/APL]] allows <source lang=apl inline>(A h)</source>, which it treats as <source lang=apl inline>A∘h</source>.<ref>dzaima/APL: [https://github.com/dzaima/APL/blob/ceea05e25687988ed0980a4abf4b9249b736543f/docs/differences.txt#L19 Differences from Dyalog APL]. Retrieved 09 Jan 2020.</ref> See [[Bind]]. | ||
== Examples == | == Examples == | ||
Line 120: | Line 122: | ||
===The Number of the Beast=== | ===The Number of the Beast=== | ||
The following expression for computing the [[wikipedia:666 (number)| | The following expression for computing the [[wikipedia:666 (number)|number of the Beast]] (and of [[I.P. Sharp]]'s APL-based email system, [[666 BOX]]) nicely illustrates how to read a train. | ||
<source lang=apl> | <source lang=apl> | ||
((+.×⍨⊢~∘.×⍨)1↓⍳)17 ⍝ Accursed train | ((+.×⍨⊢~∘.×⍨)1↓⍳)17 ⍝ Accursed train |