Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
APL (programming language)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Terminology === APL makes a clear distinction between ''functions'' and ''operators''.<ref name="MicroAOL_Operators"/><ref>{{cite web |last1=Iverson |first1=Kenneth E. |author-link=Kenneth E. Iverson |year=1987 |title=A Dictionary of APL |url=http://www.jsoftware.com/papers/APLDictionary.htm |website=www.jsoftware.com |access-date=January 20, 2015}}</ref> Functions take arrays (variables or constants or expressions) as arguments, and return arrays as results. Operators (similar to [[higher-order function]]s) take functions or arrays as arguments, and derive related functions. For example, the ''sum'' function is derived by applying the ''reduction'' operator to the ''addition'' function. Applying the same reduction operator to the ''maximum'' function (which returns the larger of two numbers) derives a function which returns the largest of a group (vector) of numbers. In the J language, Iverson substituted the terms ''verb'' for ''function'' and ''adverb'' or ''conjunction'' for ''operator''. APL also identifies those features built into the language, and represented by a symbol, or a fixed combination of symbols, as ''primitives''. Most primitives are either functions or operators. Coding APL is largely a process of writing non-primitive functions and (in some versions of APL) operators. However a few primitives are considered to be neither functions nor operators, most noticeably assignment. Some words used in APL literature have meanings that differ from those in both mathematics and the generality of computer science. {| class="wikitable" |+Terminology of APL operators |- !scope="col"| Term !scope="col"| Description |- !scope="row"| function | operation or mapping that takes zero, one (right) or two (left & right) arguments which may be scalars, arrays, or more complicated structures, and may return a similarly complex result. A function may be: * Primitive: built-in and represented by a single glyph;<ref name="aplxch6">{{cite web |url=http://www.microapl.co.uk/APL/apl_concepts_chapter6.html |title=APL concepts |publisher=Microapl.co.uk |access-date=February 3, 2010}}</ref> * Defined: as a named and ordered collection of program statements;<ref name="aplxch6"/> * Derived: as a combination of an operator with its arguments.<ref name="aplxch6"/> |- !scope="row"| array | data valued object of zero or more [[orthogonal]] dimensions in [[Row- and column-major order|row-major]] order in which each item is a primitive scalar datum or another array.<ref>{{cite web |url=http://www.nial.com/ArrayTheory.html |title=Nested array theory |publisher=Nial.com |access-date=February 3, 2010 |archive-url=https://web.archive.org/web/20110709072354/http://www.nial.com/ArrayTheory.html |archive-date=2011-07-09 |url-status=dead}}</ref> |- !scope="row"| niladic | not taking or requiring any arguments, nullary<ref name="Bohman_Froberg">"Programmera i APL", Bohman, Fröberg, [[Studentlitteratur]], {{ISBN|91-44-13162-3}}</ref> |- !scope="row"| monadic | requiring only one argument; on the right for a function, on the left for an operator, unary<ref name="Bohman_Froberg"/> |- !scope="row"| dyadic | requiring both a left and a right argument, binary<ref name="Bohman_Froberg"/> |- !scope="row"| ambivalent<br/>or monadic | capable of use in a monadic or dyadic context, permitting its left argument to be elided{{Definition needed|date=February 2024}}<ref name="aplxch6"/> |- !scope="row"| operator | operation or mapping that takes one (left) or two (left & right) function or array valued arguments (operands) and derives a function. An operator may be: * Primitive: built-in and represented by a single glyph;<ref name="aplxch6"/> * Defined: as a named and ordered collection of program statements.<ref name="aplxch6"/> |}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
APL (programming language)
(section)
Add topic