Replicate: Difference between revisions

Jump to navigation Jump to search
38 bytes added ,  17:55, 5 December 2020
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com")
Line 78: Line 78:


=== Operator or function? ===
=== Operator or function? ===
 
{{Main|Function-operator overloading}}
The syntax <source lang=apl inline>a / b</source> is ambiguous: it may be an invocation of a [[dyadic function]] <source lang=apl inline>/</source> with left [[argument]] <source lang=apl inline>a</source> and right argument <source lang=apl inline>b</source>, or of a [[monadic operator]] with [[operand]] <source lang=apl inline>a</source> and right argument <source lang=apl inline>b</source>. In early APLs there was no way to resolve this ambiguity, but with the extension of [[operator]]s to allow arbitrary function operands instead of a specified set of [[primitive function]]s, the distinction becomes apparent: a function Replicate can be used as an [[operand]] while an operator Replicate cannot.
The syntax <source lang=apl inline>a / b</source> is ambiguous: it may be an invocation of a [[dyadic function]] <source lang=apl inline>/</source> with left [[argument]] <source lang=apl inline>a</source> and right argument <source lang=apl inline>b</source>, or of a [[monadic operator]] with [[operand]] <source lang=apl inline>a</source> and right argument <source lang=apl inline>b</source>. In early APLs there was no way to resolve this ambiguity, but with the extension of [[operator]]s to allow arbitrary function operands instead of a specified set of [[primitive function]]s, the distinction becomes apparent: a function Replicate can be used as an [[operand]] while an operator Replicate cannot.


Navigation menu