trusted
46
edits
No edit summary |
m (Language source block, instead of pre) |
||
Line 4: | Line 4: | ||
In [[Extended Dyalog APL]] and [[dzaima/APL]], the construct can be formed using [[Reverse Compose]] (<code>⍛</code>) and [[Compose]] (<code>∘</code>). In this example, we multiply the [[interval]] (integers up until) of the left argument, with the [[Magnitude]] of the right: | In [[Extended Dyalog APL]] and [[dzaima/APL]], the construct can be formed using [[Reverse Compose]] (<code>⍛</code>) and [[Compose]] (<code>∘</code>). In this example, we multiply the [[interval]] (integers up until) of the left argument, with the [[Magnitude]] of the right: | ||
< | <source lang=apl> | ||
5 ⍳⍛×∘| 5 ¯8 ¯2 ¯5 3 | 5 ⍳⍛×∘| 5 ¯8 ¯2 ¯5 3 | ||
5 16 6 20 15 | 5 16 6 20 15 | ||
</ | </source> | ||
This is evaluated as <source lang=apl inline>(⍳5) × (|5 ¯8 ¯2 ¯5 3)</source>. A further example concatenates the reciprocal of the left argument with the negation of the right: | This is evaluated as <source lang=apl inline>(⍳5) × (|5 ¯8 ¯2 ¯5 3)</source>. A further example concatenates the reciprocal of the left argument with the negation of the right: | ||
<source lang=apl> | <source lang=apl> |