Difference between revisions of "Dyadic operator"

From APL Wiki
Jump to navigation Jump to search
(Created page with "In APL syntax, a '''dyadic operator''' is an operator which takes two operands, one on each side. In APL\360 the only dyadic operator was Inner Product, bu...")
(No difference)

Revision as of 13:09, 24 March 2020

In APL syntax, a dyadic operator is an operator which takes two operands, one on each side. In APL\360 the only dyadic operator was Inner Product, but other operators such as Power and Compose have become common, and languages such as J, NARS2000, and dzaima/APL have added many experimental dyadic operators.

The term "dyadic operator" refers to the valence of the operator itself, that is, the number of operands. When applied, it produces a derived function, which can have a different function valence. For example, the Inner Product is usually a dyadic operator that produces a dyadic function (+.× A is a SYNTAX ERROR, unless it's defined to be the Determinant operator), while Power generally produces an ambivalent function. The Compose function can produce an ambivalent function fg, or a monadic function Af if an array A is bound to a function f.

APL syntax [edit]
General Comparison with traditional mathematicsPrecedenceTacit programming
Array Numeric literalStringStrand notationObject literalArray notation
Function ArgumentFunction valenceDerived functionDerived operatorNiladic functionMonadic functionDyadic functionAmbivalent functionTradfnDfnFunction train
Operator OperandOperator valenceTradopDopDerived operator
Assignment MultipleIndexedSelectiveModified
Other Function axisBranchingSystem commandUser commandKeywordDot notation