HOME

TheInfoList



OR:

A direct function (dfn, pronounced "dee fun") is an alternative way to define a function and operator (a
higher-order function In mathematics and computer science, a higher-order function (HOF) is a function that does at least one of the following: * takes one or more functions as arguments (i.e. a procedural parameter, which is a parameter of a procedure that is itse ...
) in the programming language APL. A direct operator can also be called a dop (pronounced "dee op"). They were invented by John Scholes in 1996. They are a unique combination of
array programming In computer science, array programming refers to solutions which allow the application of operations to an entire set of values at once. Such solutions are commonly used in scientific and engineering settings. Modern programming languages that ...
, higher-order function, and
functional programming In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions tha ...
, and are a major distinguishing advance of early 21st century APL over prior versions. A dfn is a sequence of possibly guarded expressions (or just a guard) between , separated by or new-lines, wherein denotes the left argument and the right, and denotes
recursion Recursion (adjective: ''recursive'') occurs when a thing is defined in terms of itself or of its type. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematic ...
(function self-reference). For example, the function tests whether each row of is a Pythagorean triplet (by testing whether the sum of squares equals twice the square of the maximum). PT← PT 3 4 5 1 x 4 5 3 3 11 6 5 13 12 17 16 8 11 12 4 17 15 8 PT x 1 0 1 0 0 1 The
factorial In mathematics, the factorial of a non-negative denoted is the product of all positive integers less than or equal The factorial also equals the product of n with the next smaller factorial: \begin n! &= n \times (n-1) \times (n-2) \ ...
function as a dfn: fact← fact 5 120 fact¨ ⍳10 ⍝ fact applied to each element of 0 to 9 1 1 2 6 24 120 720 5040 40320 362880


Description

The rules for dfns are summarized by the following "reference card": A dfn is a sequence of possibly guarded expressions (or just a guard) between , separated by or new-lines. expression guard: expression guard: The expressions and/or guards are evaluated in sequence. A guard must evaluate to a 0 or 1; its associated expression is evaluated if the value is 1. A dfn terminates after the first unguarded expression which does not end in
assignment Assignment, assign or The Assignment may refer to: * Homework * Sex assignment * The process of sending National Basketball Association players to its development league; see Computing * Assignment (computer science), a type of modification to ...
, or after the first guarded expression whose guard evaluates to 1, or if there are no more expressions. The result of a dfn is that of the last evaluated expression. If that last evaluated expression ends in assignment, the result is "shy"—not automatically displayed in the session. Names assigned in a dfn are
local Local may refer to: Geography and transportation * Local (train), a train serving local traffic demand * Local, Missouri, a community in the United States * Local government, a form of public administration, usually the lowest tier of administrat ...
by default, with
lexical scope In computer programming, the scope of a name binding (an association of a name to an entity, such as a variable) is the part of a program where the name binding is valid; that is, where the name can be used to refer to the entity. In other parts ...
. denotes the left function argument and the right; denotes the left operand and the right. If occurs in the definition, then the dfn is a dyadic operator; if only occurs but not , then it is a monadic operator; if neither or occurs, then the dfn is a function. The special syntax is used to give a default value to the left argument if a dfn is called monadically, that is, called with no left argument. The is not evaluated otherwise. denotes
recursion Recursion (adjective: ''recursive'') occurs when a thing is defined in terms of itself or of its type. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematic ...
or self-reference by the function, and denotes self-reference by the operator. Such denotation permits anonymous recursion. Error trapping is provided through error-guards, . When an error is generated, the system searches dynamically through the calling functions for an error-guard that matches the error. If one is found, the execution environment is unwound to its state immediately prior to the error-guard's execution and the associated expression of the error-guard is evaluated as the result of the dfn. Additional descriptions, explanations, and tutorials on dfns are available in the cited articles.


Examples

The examples here illustrate different aspects of dfns. Additional examples are found in the cited articles.


Default left argument

The function adds to ( or \sqrt) times . 3 4 3J4 ∘.⍨ ¯2+⍳5 ¯2J¯2 ¯2J¯1 ¯2 ¯2J1 ¯2J2 ¯1J¯2 ¯1J¯1 ¯1 ¯1J1 ¯1J2 0J¯2 0J¯1 0 0J1 0J2 1J¯2 1J¯1 1 1J1 1J2 2J¯2 2J¯1 2 2J1 2J2 The significance of this function can be seen as follows: Moreover, analogous to that monadic ⇔ (''negate'') and monadic ⇔ (''reciprocal''), a monadic definition of the function is useful, effected by specifying a default value of 0 for : if , then ⇔ ⇔ . j← 3 j 4 ¯5.6 7.89 3J4 3J¯5.6 3J7.89 j 4 ¯5.6 7.89 0J4 0J¯5.6 0J7.89 sin← 1∘○ cos← 2∘○ Euler← Euler (¯0.5+?10⍴0) j (¯0.5+?10⍴0) 1 1 1 1 1 1 1 1 1 1 The last expression illustrates
Euler's formula Euler's formula, named after Leonhard Euler, is a mathematical formula in complex analysis that establishes the fundamental relationship between the trigonometric functions and the complex exponential function. Euler's formula states that ...
on ten random numbers with real and imaginary parts in the interval \left(-0.5,0.5\right).


Single recursion

The ternary construction of the
Cantor set In mathematics, the Cantor set is a set of points lying on a single line segment that has a number of unintuitive properties. It was discovered in 1874 by Henry John Stephen Smith and introduced by German mathematician Georg Cantor in 1883. T ...
starts with the interval ,1and at each stage removes the middle third from each remaining subinterval: \biggl ,1\biggr\to \left ,\frac\right\cup \left frac,1\right\to \left ,\frac\right\cup \left frac,\frac\right\cup \left frac,\frac\right\cup \left frac,1\right\to \cdots The Cantor set of order defined as a dfn: Cantor← Cantor 0 1 Cantor 1 1 0 1 Cantor 2 1 0 1 0 0 0 1 0 1 Cantor 3 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 1 Cantor 0 to Cantor 6 depicted as black bars: The function computes a bit vector of length so that bit (for and ) is 1 if and only if is a
prime A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
. sieve← 10 10 ⍴ sieve 100 0 0 1 1 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 b←sieve 1e9 ≢b 1000000000 (10*⍳10) (+⌿↑)⍤0 1 ⊢b 0 4 25 168 1229 9592 78498 664579 5761455 50847534 The last sequence, the number of primes less than powers of 10, is an initial segment of . The last number, 50847534, is the number of primes less than 10^9. It is called Bertelsen's number, memorably described by
MathWorld ''MathWorld'' is an online mathematics reference work, created and largely written by Eric W. Weisstein. It is sponsored by and licensed to Wolfram Research, Inc. and was partially funded by the National Science Foundation's National Science Di ...
as "an erroneous name erroneously given the erroneous value of \pi(10^9) = 50847478". uses two different methods to mark composites with 0s, both effected using local anonymous dfns: The first uses the
sieve of Eratosthenes In mathematics, the sieve of Eratosthenes is an ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e., not prime) the multiples of each prime, starting with the first prime n ...
on an initial mask of 1 and a prefix of the primes 2 3...43, using the ''insert'' operator ( right fold). (The length of the prefix obtains by comparison with the primorial function .) The second finds the smallest new prime remaining in (), and sets to 0 bit itself and bits at times the numbers at remaining 1 bits in an initial segment of (). This second dfn uses tail recursion.


Tail recursion

Typically, the
factorial In mathematics, the factorial of a non-negative denoted is the product of all positive integers less than or equal The factorial also equals the product of n with the next smaller factorial: \begin n! &= n \times (n-1) \times (n-2) \ ...
function is define recursively (as above), but it can be coded to exploit
tail recursion In computer science, a tail call is a subroutine call performed as the final action of a procedure. If the target of a tail is the same subroutine, the subroutine is said to be tail recursive, which is a special case of direct recursion. Tail recur ...
by using an accumulator left argument: fac← Similarly, the
determinant In mathematics, the determinant is a scalar value that is a function of the entries of a square matrix. It characterizes some properties of the matrix and the linear map represented by the matrix. In particular, the determinant is nonzero if a ...
of a square complex matrix using
Gaussian elimination In mathematics, Gaussian elimination, also known as row reduction, is an algorithm for solving systems of linear equations. It consists of a sequence of operations performed on the corresponding matrix of coefficients. This method can also be used ...
can be computed with tail recursion: det←


Multiple recursion

A partition of a non-negative integer n is a vector v of positive integers such that , where the order in v is not significant. For example, and are partitions of 4, and and and are considered to be the same partition. The partition function P(n) counts the number of partitions. The function is of interest in
number theory Number theory (or arithmetic or higher arithmetic in older usage) is a branch of pure mathematics devoted primarily to the study of the integers and integer-valued functions. German mathematician Carl Friedrich Gauss (1777–1855) said, "Ma ...
, studied by
Euler Leonhard Euler ( , ; 15 April 170718 September 1783) was a Swiss mathematician, physicist, astronomer, geographer, logician and engineer who founded the studies of graph theory and topology and made pioneering and influential discoveries in ...
,
Hardy Hardy may refer to: People * Hardy (surname) * Hardy (given name) * Hardy (singer), American singer-songwriter Places Antarctica * Mount Hardy, Enderby Land * Hardy Cove, Greenwich Island * Hardy Rocks, Biscoe Islands Australia * Hardy, Sout ...
, Ramanujan,
Erdős Erdős, Erdos, or Erdoes is a Hungarian surname. People with the surname include: * Ágnes Erdős (born 1950), Hungarian politician * Brad Erdos (born 1990), Canadian football player * Éva Erdős (born 1964), Hungarian handball player * Józ ...
, and others. The recurrence relation :P(n)=\sum_^n (-1)^ (n-\frack(3k-1))+P(n-\frack(3k+1))/math> derived from Euler's pentagonal number theorem. Written as a dfn: pn ← rec ← pn 10 42 pn¨ ⍳13 ⍝ OEIS A000041 1 1 2 3 5 7 11 15 22 30 42 56 77 The basis step states that for , the result of the function is , 1 if ⍵ is 0 or 1 and 0 otherwise. The recursive step is highly multiply recursive. For example, would result in the function being applied to each element of , which are: rec 200 199 195 188 178 165 149 130 108 83 55 24 ¯10 198 193 185 174 160 143 123 100 74 45 13 ¯22 and requires longer than the
age of the universe In physical cosmology, the age of the universe is the time elapsed since the Big Bang. Astronomers have derived two different measurements of the age of the universe: a measurement based on direct observations of an early state of the universe, ...
to compute (7.57\times10^ function calls to itself). The compute time can be reduced by
memoization In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls and returning the cached result when the same inputs occur again. Memoization ...
, here implemented as the direct operator (higher-order function) : M← pn M 200 3.973E12 0 ⍕ pn M 200 ⍝ format to 0 decimal places 3972999029388 This value of agrees with that computed by Hardy and Ramanujan in 1918. The memo operator defines a variant of its operand function to use a
cache Cache, caching, or caché may refer to: Places United States * Cache, Idaho, an unincorporated community * Cache, Illinois, an unincorporated community * Cache, Oklahoma, a city in Comanche County * Cache, Utah, Cache County, Utah * Cache County ...
and then evaluates it. With the operand the variant is:


Direct operator (dop)

Quicksort Quicksort is an efficient, general-purpose sorting algorithm. Quicksort was developed by British computer scientist Tony Hoare in 1959 and published in 1961, it is still a commonly used algorithm for sorting. Overall, it is slightly faster than ...
on an array works by choosing a "pivot" at random among its major cells, then catenating the sorted major cells which strictly precede the pivot, the major cells equal to the pivot, and the sorted major cells which strictly follow the pivot, as determined by a comparison function . Defined as a direct operator (dop) : Q← ⍝ precedes ⍝ follows ⍝ equals 2 (×-) 8 8 (×-) 2 8 (×-) 8 ¯1 1 0 x← 2 19 3 8 3 6 9 4 19 7 0 10 15 14 (×-) Q x 0 2 3 3 4 6 7 8 9 10 14 15 19 19 is a variant that catenates the three parts enclosed by the function instead of the parts ''per se''. The three parts generated at each recursive step are apparent in the structure of the final result. Applying the function derived from to the same argument multiple times gives different results because the pivots are chosen at random.
In-order traversal In computer science, tree traversal (also known as tree search and walking the tree) is a form of graph traversal and refers to the process of visiting (e.g. retrieving, updating, or deleting) each node in a tree data structure, exactly once ...
of the results does yield the same sorted array. Q3← (×-) Q3 x ┌────────────────────────────────────────────┬─────┬┐ │┌──────────────┬─┬─────────────────────────┐│19 19││ ││┌──────┬───┬─┐│6│┌──────┬─┬──────────────┐││ ││ │││┌┬─┬─┐│3 3│4││ ││┌┬─┬─┐│9│┌┬──┬────────┐│││ ││ │││││0│2││ │ ││ ││││7│8││ │││10│┌──┬──┬┐││││ ││ │││└┴─┴─┘│ │ ││ ││└┴─┴─┘│ │││ ││14│15││││││ ││ ││└──────┴───┴─┘│ ││ │ │││ │└──┴──┴┘││││ ││ ││ │ ││ │ │└┴──┴────────┘│││ ││ ││ │ │└──────┴─┴──────────────┘││ ││ │└──────────────┴─┴─────────────────────────┘│ ││ └────────────────────────────────────────────┴─────┴┘ (×-) Q3 x ┌───────────────────────────┬─┬─────────────────────────────┐ │┌┬─┬──────────────────────┐│7│┌────────────────────┬─────┬┐│ │││0│┌┬─┬─────────────────┐││ ││┌──────┬──┬────────┐│19 19│││ │││ │││2│┌────────────┬─┬┐│││ │││┌┬─┬─┐│10│┌──┬──┬┐││ │││ │││ │││ ││┌───────┬─┬┐│6│││││ │││││8│9││ ││14│15││││ │││ │││ │││ │││┌┬───┬┐│4│││ │││││ │││└┴─┴─┘│ │└──┴──┴┘││ │││ │││ │││ │││││3 3│││ │││ │││││ ││└──────┴──┴────────┘│ │││ │││ │││ │││└┴───┴┘│ │││ │││││ │└────────────────────┴─────┴┘│ │││ │││ ││└───────┴─┴┘│ │││││ │ │ │││ │││ │└────────────┴─┴┘│││ │ │ │││ │└┴─┴─────────────────┘││ │ │ │└┴─┴──────────────────────┘│ │ │ └───────────────────────────┴─┴─────────────────────────────┘ The above formulation is not new; see for example Figure 3.7 of the classic ''The Design and Analysis of Computer Algorithms''. However, unlike the
pidgin A pidgin , or pidgin language, is a grammatically simplified means of communication that develops between two or more groups of people that do not have a language in common: typically, its vocabulary and grammar are limited and often drawn from s ...
ALGOL ALGOL (; short for "Algorithmic Language") is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the ...
program in Figure 3.7, is executable, and the partial order used in the sorting is an operand, the the examples above.


Dfns with operators and trains

Dfns, especially anonymous dfns, work well with operators and trains. The following snippet solves a "Programming Pearls" puzzle: given a dictionary of English words, here represented as the character matrix , find all sets of anagrams. a ⍤1 ⊢a (⍤1 ⌸ ⊢) a pats apst ┌────┬────┬────┐ spat apst │pats│teas│star│ teas aest │spat│sate│ │ sate aest │taps│etas│ │ taps apst │past│seat│ │ etas aest │ │eats│ │ past apst │ │tase│ │ seat aest │ │east│ │ eats aest │ │seta│ │ tase aest └────┴────┴────┘ star arst east aest seta aest The algorithm works by sorting the rows individually (), and these sorted rows are used as keys ("signature" in the Programming Pearls description) to the ''key'' operator to group the rows of the matrix. The expression on the right is a ''train'', a syntactic form employed by APL to achieve
tacit programming Tacit programming, also called point-free style, is a programming paradigm in which function definitions do not identify the arguments (or "points") on which they operate. Instead the definitions merely compose other functions, among which are c ...
. Here, it is an isolated sequence of three functions such that ⇔ , whence the expression on the right is equivalent to .


Lexical scope

When an inner (nested) dfn refers to a name, it is sought by looking outward through enclosing dfns rather than down the
call stack In computer science, a call stack is a stack data structure that stores information about the active subroutines of a computer program. This kind of stack is also known as an execution stack, program stack, control stack, run-time stack, or mac ...
. This regime is said to employ
lexical scope In computer programming, the scope of a name binding (an association of a name to an entity, such as a variable) is the part of a program where the name binding is valid; that is, where the name can be used to refer to the entity. In other parts ...
instead of APL's usual dynamic scope. The distinction becomes apparent only if a call is made to a function defined at an outer level. For the more usual inward calls, the two regimes are indistinguishable. For example, in the following function , the variable is defined both in itself and in the inner function . When calls outward to and refers to , it finds the outer one (with value ) rather than the one defined in (with value ): which← which ' scope' lexical scope


Error-guard

The following function illustrates use of error guards: plus← 2 plus 3 ⍝ no errors 5 2 3 4 5 plus 'three' ⍝ argument lengths don't match length 2 3 4 5 plus 'four' ⍝ can't add characters domain 2 3 plus 3 4⍴5 ⍝ can't add vector to matrix catch all In APL, error number 5 is "length error"; error number 11 is "domain error"; and error number 0 is a "catch all" for error numbers 1 to 999. The example shows the unwinding of the local environment before an error-guard's expression is evaluated. The local name is set to describe the purview of its following error-guard. When an error occurs, the environment is unwound to expose 's statically correct value.


Dfns ''versus'' tradfns

Since direct functions are dfns, APL functions defined in the traditional manner are referred to as tradfns, pronounced "trad funs". Here, dfns and tradfns are compared by consideration of the function : On the left is a dfn (as defined above); in the middle is a tradfn using control structures; on the right is a tradfn using
goto GoTo (goto, GOTO, GO TO or other case combinations, depending on the programming language) is a statement found in many computer programming languages. It performs a one-way transfer of control to another line of code; in contrast a function c ...
s () and line labels. * A dfn can be
anonymous Anonymous may refer to: * Anonymity, the state of an individual's identity, or personally identifiable information, being publicly unknown ** Anonymous work, a work of art or literature that has an unnamed or unknown creator or author * Anony ...
; a tradfn must be named. * A dfn is named by assignment (); a tradfn is named by embedding the name in the representation of the function and applying (a system function) to that representation. * A dfn is handier than a tradfn as an operand (see preceding items: a tradfn must be named; a tradfn is named by embedding ...). * Names assigned in a dfn are
local Local may refer to: Geography and transportation * Local (train), a train serving local traffic demand * Local, Missouri, a community in the United States * Local government, a form of public administration, usually the lowest tier of administrat ...
by default; names assigned in a tradfn are
global Global means of or referring to a globe and may also refer to: Entertainment * ''Global'' (Paul van Dyk album), 2003 * ''Global'' (Bunji Garlin album), 2007 * ''Global'' (Humanoid album), 1989 * ''Global'' (Todd Rundgren album), 2015 * Bruno ...
unless specified in a locals list. * Locals in a dfn have
lexical scope In computer programming, the scope of a name binding (an association of a name to an entity, such as a variable) is the part of a program where the name binding is valid; that is, where the name can be used to refer to the entity. In other parts ...
; locals in a tradfn have dynamic scope, visible in called functions unless
shadowed ''Shadowed'', also known as ''The Gloved Hand'', is a 1946 American film noir crime film directed by John Sturges and starring Anita Louise, Lloyd Corrigan, and Robert Scott. Plot Salesman Fred J. Johnson manages to hit a hole-in-one as he play ...
by ''their'' locals list. * The arguments of a dfn are named and and the operands of a dop are named and ; the arguments and operands of a tradfn can have any name, specified on its leading line. * The result (if any) of a dfn is unnamed; the result (if any) of a tradfn is named in its header. * A default value for ⍺ is specified more neatly than for the left argument of a tradfn. *
Recursion Recursion (adjective: ''recursive'') occurs when a thing is defined in terms of itself or of its type. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematic ...
in a dfn is effected by invoking or or its name; recursion in a tradfn is effected by invoking its name. * Flow control in a dfn is effected by guards and function calls; that in a tradfn is by control structures and (goto) and line labels. * Evaluating an expression in a dfn not ending in assignment causes return from the dfn; evaluating a line in a tradfn not ending in assignment or goto displays the result of the line. * A dfn returns on evaluating an expression not ending in assignment, on evaluating a guarded expression, or after the last expression; a tradfn returns on (goto) line 0 or a non-existing line, or on evaluating a control structure, or after the last line. * The simpler flow control in a dfn makes it easier to detect and implement
tail recursion In computer science, a tail call is a subroutine call performed as the final action of a procedure. If the target of a tail is the same subroutine, the subroutine is said to be tail recursive, which is a special case of direct recursion. Tail recur ...
than in a tradfn. * A dfn may call a tradfn and ''vice versa''; a dfn may be defined in a tradfn, and ''vice versa''.


History

Kenneth E. Iverson Kenneth Eugene Iverson (17 December 1920 – 19 October 2004) was a Canadian computer scientist noted for the development of the programming language APL. He was honored with the Turing Award in 1979 "for his pioneering effort in programming l ...
, the inventor of APL, was dissatisfied with the way user functions (tradfns) were defined. In 1974, he devised "formal function definition" or "direct definition" for use in exposition. A direct definition has two or four parts, separated by colons: name : expression name : expression0 : proposition : expression1 Within a direct definition, denotes the left argument and the right argument. In the first instance, the result of is the result of the function; in the second instance, the result of the function is that of if evaluates to 0, or if it evaluates to 1. Assignments within a direct definition are dynamically local. Examples of using direct definition are found in the 1979
Turing Award The ACM A. M. Turing Award is an annual prize given by the Association for Computing Machinery (ACM) for contributions of lasting and major technical importance to computer science. It is generally recognized as the highest distinction in compu ...
Lecture and in books and application papers. Direct definition was too limited for use in larger systems. The ideas were further developed by multiple authors in multiple works but the results were unwieldy. Of these, the "alternative APL function definition" of Bunda in 1987 came closest to current facilities, but is flawed in conflicts with existing symbols and in error handling which would have caused practical difficulties, and was never implemented. The main distillates from the different proposals were that (a) the function being defined is anonymous, with subsequent naming (if required) being effected by assignment; (b) the function is denoted by a symbol and thereby enables anonymous recursion. In 1996, John Scholes of Dyalog Limited invented direct functions (dfns). The ideas originated in 1989 when he read a special issue of ''
The Computer Journal ''The Computer Journal'' is a peer-reviewed scientific journal covering computer science and information systems. Established in 1958, it is one of the oldest computer science research journals. It is published by Oxford University Press on behal ...
'' on functional programming. He then proceeded to study functional programming and became strongly motivated ("sick with desire", like
Yeats William Butler Yeats (13 June 186528 January 1939) was an Irish poet, dramatist, writer and one of the foremost figures of 20th-century literature. He was a driving force behind the Irish Literary Revival and became a pillar of the Irish liter ...
) to bring these ideas to APL. He initially operated in stealth because he was concerned the changes might be judged too radical and an unnecessary complication of the language; other observers say that he operated in stealth because Dyalog colleagues were not so enamored and thought he was wasting his time and causing trouble for people. Dfns were first presented in the Dyalog Vendor Forum at the APL '96 Conference and released in Dyalog APL in early 1997. Acceptance and recognition were slow in coming. As late as 2008, in ''Dyalog at 25'', a publication celebrating the 25th anniversary of Dyalog Limited, dfns were barely mentioned (mentioned twice as "dynamic functions" and without elaboration). As of 2019, dfns are implemented in Dyalog APL, NARS2000, and ngn/apl. They also play a key role in efforts to exploit the computing abilities of a
graphics processing unit A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, m ...
(GPU).


References


External links

* , Dyalog {{DEFAULTSORT:Direct functions APL programming language family Array programming languages Formal methods Functional programming Higher-order functions Programming language topics Programming paradigms