APL (named after the book A Programming Language) is an interactive array-oriented language. It is based on a mathematical notation developed by Kenneth E. Iverson. Do not use this tag for Alexa Presentation Language; use [alexa-presentation-language] instead.
Wiki
APL
, short for A Programming Language, is an interactive array-oriented language and integrated development environment. It is an interpreted language with built-in array capabilities and outstanding debugging features that makes the language a perfect choice for the agile approach. APL is also the first functional programming language ever, and it is also considered as a tacit programming language.
Example
APL
uses symbols, array comprehension, and implied Iverson brackets to make its code concise and enable thinking about it much like Mathematical formulas.
This example assigns the vector (list) value 4 5 6 7
to N
:
N ← 4 5 6 7
The code below then adds 4 to all elements of the vector (giving 8 9 10 11
):
N + 4
Now we can get a Boolean mask indicating results of 10 or higher (giving 0 0 1 1
):
10 ≤ N + 4
And sum that to find out how many sums fulfilled the criteria (giving 2
):
+/ 10 ≤ N + 4
Tag usage
The tag apl should be used for programming related problems in implementing or using the APL
programming language. Please avoid theoretical and conceptual questions on Stack Overflow. Other tags such as tacit-programming, array or matrix can also be used with tag apl. Make sure to specify which dialect you use, for example by using the dyalog tag.
Read more
- Wikipedia: APL, syntax and symbols
- APL Wiki
- APLX Tutorial
- TryAPL
- Mastering Dyalog APL book
- Kenneth Iverson: A Programming Language (1962)
- The APL Orchard (Stack Exchange chat room)