## APL a Day #7: Scalar Functions

Scalar functions perform most of the hard labor in an APL program. A scalar function defines a mapping from one or two scalar values to a third value. In math, the addition function maps two numbers to their sum. Many other such functions exist. The following table gives all the

## APL a Day #6: Indices and Encoding

Previous sessions established a basic conception of indexing an array. Namely, an index encodes a reference to an element in an array according to the position of the element along each of its dimensions. Always a vector, each element of an index falls in the range [0, d) where d

## APL a Day #5: Indexing into Arrays

By now, clearly a shape and vector of values precisely determines an array. All APL functions operate over arrays; they describe new arrays in terms of its arguments. What about describing a sub-array of another array? Indexing provides a means of identifying specific elements of an array. Some people might

## APL a Day #4: Arrays have elements

An array that only describes a box which may contain elements, but that does not contain any elements, does not mean much. While shapes help to clarify the APL language, when doing any work, they really only describe how to arrange the elements of an array. The monadic ravel function

## APL a Day #3: Arrays have Shape

Arrays arrange data into a certain rectangular shape. In APL, the shape of an array is a vector --- yes, in APL, shapes are also arrays --- that describes the number and size of layout in terms of dimensions. All arrays have a shape; if A is an array then

## APL a Day #2: Arrays, Values

Last session belabored the function, it's relation to APL, and how APL's treatment of functions differs from traditional mathematics. Keep functions in mind: they come first for a reason. All future sessions will assume that you understand or can quickly figure out functions and how they were. Today's session introduces

## APL a Day #1: Functions

In early grade school mathematics, students already learn the concept of a function, but they do not know what they are called. An expression like 5+5 uses the function known as addition. The addition function takes two numbers and describes a new value in terms of the two old