I-Beam (⌶
) is a primitive ambivalent function or monadic operator that takes a numeric code as an argument/operand and provides a range of ad-hoc operations. This range covers non-primitive functions, for example experimental features, interpreter-level control, access to the environment, and information about APL itself.
History
I-Beam was introduced in APL\360 as an ambivalent function for implementers to execute IBM System/360 (I-Beam being pronounced very similarly to IBM) instructions from program control. The convenience of this lead to I-Beam becoming directly available for use by anyone.[1] However, modern IBM-derived APLs replace all I-Beams with quad names. For example, 5⌶
became ⎕DL
(Delay) while changing time unit from jiffies of 1⁄300th of a second to a whole second.
Later, after it became common to use arrays as operands, Dyalog APL began using the glyph as an operator where the operand selects functionality. It is used for testing experimental features, some of which may eventually become primitives or quad name. For example, 819⌶
became ⎕C
(Case Convert), while introducing distinction between case folding (for case insensitive comparisons) and case mapping (for human presentation forms).
Mnemonics
In general, I-Beam's numeric operand isn't intended to be easily recalled. But some are given meaningful names.
One method is to devise a name from the Roman numeral letters I, V, X, L, C, D, and M:[2]
I-Beam |
Numeral
|
Colour Coding |
CC (200)
|
Colour Coding Information |
CCI (201)
|
Called Monadically |
CM (900)
|
Line Count |
LC (50100)
|
References
APL built-ins [edit]
|
Primitives (Timeline) |
Functions
|
Scalar
|
Monadic
|
Conjugate ∙ Negate ∙ Signum ∙ Reciprocal ∙ Magnitude ∙ Exponential ∙ Natural Logarithm ∙ Floor ∙ Ceiling ∙ Factorial ∙ Not ∙ Pi Times ∙ Roll ∙ Type ∙ Imaginary ∙ Square Root ∙ Round
|
Dyadic
|
Add ∙ Subtract ∙ Times ∙ Divide ∙ Residue ∙ Power ∙ Logarithm ∙ Minimum ∙ Maximum ∙ Binomial ∙ Comparison functions ∙ Boolean functions (And, Or, Nand, Nor) ∙ GCD ∙ LCM ∙ Circular ∙ Complex ∙ Root
|
Non-Scalar
|
Structural
|
Shape ∙ Reshape ∙ Tally ∙ Depth ∙ Ravel ∙ Enlist ∙ Table ∙ Catenate ∙ Reverse ∙ Rotate ∙ Transpose ∙ Raze ∙ Mix ∙ Split ∙ Enclose ∙ Nest ∙ Cut (K) ∙ Pair ∙ Link ∙ Partitioned Enclose ∙ Partition
|
Selection
|
First ∙ Pick ∙ Take ∙ Drop ∙ Unique ∙ Identity ∙ Stop ∙ Select ∙ Replicate ∙ Expand ∙ Set functions (Intersection ∙ Union ∙ Without) ∙ Bracket indexing ∙ Index ∙ Cartesian Product ∙ Sort
|
Selector
|
Index generator ∙ Grade ∙ Index Of ∙ Interval Index ∙ Indices ∙ Deal ∙ Prefix and suffix vectors
|
Computational
|
Match ∙ Not Match ∙ Membership ∙ Find ∙ Nub Sieve ∙ Encode ∙ Decode ∙ Matrix Inverse ∙ Matrix Divide ∙ Format ∙ Execute ∙ Materialise ∙ Range
|
Operators |
Monadic
|
Each ∙ Commute ∙ Constant ∙ Replicate ∙ Expand ∙ Reduce ∙ Windowed Reduce ∙ Scan ∙ Outer Product ∙ Key ∙ I-Beam ∙ Spawn ∙ Function axis ∙ Identity (Null, Ident)
|
Dyadic
|
Bind ∙ Compositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner Product ∙ Determinant ∙ Power ∙ At ∙ Under ∙ Rank ∙ Depth ∙ Variant ∙ Stencil ∙ Cut ∙ Direct definition (operator) ∙ Identity (Lev, Dex)
|
Quad names
|
Index origin ∙ Comparison tolerance ∙ Migration level ∙ Atomic vector
|