Mixed function: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
(Created page with "A '''mixed function''' is one of a class of primitive functions that consider their entire arguments rather than treating each element at a time. The exact parts o...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
Tags: Mobile edit Mobile web edit
Line 1: Line 1:
A '''mixed function''' is one of a class of [[primitive function]]s that consider their entire [[argument]]s rather than treating each [[element]] at a time. The exact parts of an argument that is considered as a unit, varies per function, rather than adhering to a general rule. Hence the name "mixed" as in a "mixed bag" of functions. This is opposed to [[scalar function]]s which are defined in terms of operations on [[simple scalar]]s.
A '''mixed function''' is one of a class of [[primitive function]]s that consider their entire [[argument]]s rather than treating each [[element]] at a time. The exact parts of an argument that is considered as a unit, varies per function, rather than adhering to a general rule. Hence the name "mixed" as in a "mixed bag" of functions. This is opposed to [[scalar function]]s which are defined in terms of operations on [[simple scalar]]s.


For example, while [[Equal]] (<source lang=apl inline>=</source>) is a scalar function in that it compares (corresponding) elements, [[Match]] (<source lang=apl inline>≡</source>) gives a single result which indicates if the arguments, as wholes, are identical.
For example, while [[Equal]] (<source lang=apl inline>=</syntaxhighlight>) is a scalar function in that it compares (corresponding) elements, [[Match]] (<source lang=apl inline>≡</syntaxhighlight>) gives a single result which indicates if the arguments, as wholes, are identical.


== External links ==
== External links ==

Revision as of 21:01, 10 September 2022

A mixed function is one of a class of primitive functions that consider their entire arguments rather than treating each element at a time. The exact parts of an argument that is considered as a unit, varies per function, rather than adhering to a general rule. Hence the name "mixed" as in a "mixed bag" of functions. This is opposed to scalar functions which are defined in terms of operations on simple scalars.

For example, while Equal (<source lang=apl inline>=</syntaxhighlight>) is a scalar function in that it compares (corresponding) elements, Match (<source lang=apl inline>≡</syntaxhighlight>) gives a single result which indicates if the arguments, as wholes, are identical.

External links


APL features [edit]
Built-ins Primitives (functions, operators) ∙ Quad name
Array model ShapeRankDepthBoundIndex (Indexing) ∙ AxisRavelRavel orderElementScalarVectorMatrixSimple scalarSimple arrayNested arrayCellMajor cellSubarrayEmpty arrayPrototype
Data types Number (Boolean, Complex number) ∙ Character (String) ∙ BoxNamespaceFunction array
Concepts and paradigms Conformability (Scalar extension, Leading axis agreement) ∙ Scalar function (Pervasion) ∙ Identity elementComplex floorArray ordering (Total) ∙ Tacit programming (Function composition, Close composition) ∙ GlyphLeading axis theoryMajor cell searchFirst-class function
Errors LIMIT ERRORRANK ERRORSYNTAX ERRORDOMAIN ERRORLENGTH ERRORINDEX ERRORVALUE ERROREVOLUTION ERROR