Replicate: Difference between revisions

Jump to navigation Jump to search
No change in size ,  15:28, 27 March 2020
m
Capitalization for ngn/apl
m (Capitalization for ngn/apl)
Line 37: Line 37:
       0 2 ¯3 1 / ⍳4
       0 2 ¯3 1 / ⍳4
2 2 0 0 0 4
2 2 0 0 0 4
</source>{{Works in|[[NARS2000]], [[Dyalog APL]], [[APLX]], [[ngn/APL]]}}
</source>{{Works in|[[NARS2000]], [[Dyalog APL]], [[APLX]], [[ngn/apl]]}}
<source lang=apl>
<source lang=apl>
       0 2 ¯3 1 / ⍳3
       0 2 ¯3 1 / ⍳3
Line 46: Line 46:
       1 ¯2 3 / 'a'
       1 ¯2 3 / 'a'
a  aaa
a  aaa
</source>{{Works in|[[NARS2000]], [[APL2]], [[Dyalog APL]], [[APLX]], [[ngn/APL]], [[GNU APL]]}}
</source>{{Works in|[[NARS2000]], [[APL2]], [[Dyalog APL]], [[APLX]], [[ngn/apl]], [[GNU APL]]}}


=== High-rank arrays ===
=== High-rank arrays ===
Line 73: Line 73:
b  bbb
b  bbb
c  ccc
c  ccc
</source>{{Works in|[[APL2]], [[Dyalog APL]], [[APLX]], [[ngn/APL]], [[GNU APL]]}}
</source>{{Works in|[[APL2]], [[Dyalog APL]], [[APLX]], [[ngn/apl]], [[GNU APL]]}}


=== Operator or function? ===
=== Operator or function? ===
Line 93: Line 93:
  ab  cccddd
  ab  cccddd
</source>{{Works in|[[NARS2000]], [[Dyalog APL]], [[GNU APL]]}}
</source>{{Works in|[[NARS2000]], [[Dyalog APL]], [[GNU APL]]}}
In early APLs such as [[APL\360]], applying an operator to Compress will always result in a [[SYNTAX ERROR]], because Compress is not an allowed operand of any operator. This is also the case in [[ngn/APL]]: although operators can apply to any function, Replicate cannot be used unless both arguments are immediately available. In both cases there is no way to determine whether Replicate "acts like a function" or "acts like an operator".
In early APLs such as [[APL\360]], applying an operator to Compress will always result in a [[SYNTAX ERROR]], because Compress is not an allowed operand of any operator. This is also the case in [[ngn/apl]]: although operators can apply to any function, Replicate cannot be used unless both arguments are immediately available. In both cases there is no way to determine whether Replicate "acts like a function" or "acts like an operator".


== History ==
== History ==

Navigation menu