Operator
In APL syntax, an operator applies to function or array operands to yield a derived function result. Operators bind with higher precedence than functions and are grouped from left to right, the opposite of APL's right to left evaluation order for functions. In most cases operators cannot themselves be modified, but reductions and scans do take a specified axis, and in some APLs hyperators can take operator hyperands.
Operators may be primitive operators, system operators, or defined operators. In some APLs it is also possible to produce a derived operator by passing only one operand to a dyadic operator.
An operator's valence indicates the number of operands it takes:
- A monadic operator takes one operand to its left (except Outer Product, which has a special syntax).
- A dyadic operator takes a left and a right operand.
Unlike with monadic and dyadic functions, an operator's valence is an intrinsic property and must be known in order to parse an APL expression containing it. Also unlike functions, there is no such thing as a "niladic operator" taking no operands, because this would be indistinguishable from a niladic function.