Difference between revisions of "Dfn"

From APL Wiki
Jump to navigation Jump to search
Line 13: Line 13:
 
* [http://help.dyalog.com/latest/#Language/Defined%20Functions%20and%20Operators/DynamicFunctions/Dynamic%20Functions%20and%20Operators.htm Dyalog]
 
* [http://help.dyalog.com/latest/#Language/Defined%20Functions%20and%20Operators/DynamicFunctions/Dynamic%20Functions%20and%20Operators.htm Dyalog]
 
* [https://www.gnu.org/software/apl/apl.html#Section-3_002e7 GNU APL]
 
* [https://www.gnu.org/software/apl/apl.html#Section-3_002e7 GNU APL]
 +
 +
{{APL syntax}}

Revision as of 11:56, 4 March 2020

A dfn (contraction of direct function or dynamic function, pronounced "dee fun") is an alternative way to define a function and operator, invented by John Scholes. A dfn operator can also be called a dop (pronounced "dee op").

John Scholes was responsible for numerous presentations and publications on and about dfns, and until his passing he maintained the dfns website.

As of 2020, dfns are fully implemented in Dyalog APL, NARS2000, ngn/apl, dzaima/APL, and partially in GNU APL, although not all dialects implement lexical scoping, in contrast to the dynamic scoping of tradfns. In other words, a dfn cannot "see" locals of its caller, but can see locals of its definer.

Wikipedia includes a thorough treatment of dfns.

External links

Tutorials

Documentation


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 axisBranchSystem commandUser commandKeywordDot notationFunction-operator overloading