NARS
STSC's APL*PLUS Nested Arrays System (acronymized NARS, from "Nested Array Research System") was the first commercial nested APL implementation. Drawing on work by Jim Brown, Trenchard More, and development manager Bob Smith, NARS introduced a new set of functions for working with arrays that contain arrays, as well as many new operators such as Power.^{[2]}
Primitives
NARS was an extension of APL*PLUS, which used the APL.SV primitive set, except for Execute (⍎
). Only new primitives are shown here, with existing cases in parentheses.
Functions
Glyph | Monadic | Dyadic |
---|---|---|
⊂ |
Enclose | Partitioned Enclose |
⊃ |
Disclose or First | Pick |
⊤ |
Type | |
≡ |
Simple (NARS) | Equivalent |
≢ |
Not-Simple | Inequivalent |
↓ |
Split | (Drop) |
↑ |
Mix | (Take) |
∪ |
Unique | Union |
~ |
Set Difference | |
∩ |
Intersection | |
⍪ |
Catenate along the First Dimension |
Additionally, Index Generator was extended to allow a vector argument, Replicate and Expand were extended to allow integer left arguments, and Reshape was extended to allow an empty right argument (using fill elements).
Operators
Syntax | Monadic call | Dyadic call |
---|---|---|
f/ |
(Reduction) | Dyadic Reduction (Windowed Reduction) |
f\ |
(Scan) | Dyadic Scan |
f¨ |
Each | |
f⍨ |
Commute | |
f⍣B |
Power | |
f⍣∘ |
Power Limit | |
f⍣∘ |
Power Series | |
f∘g |
Composition (Beside) | |
A∘g |
Composition (Bind) | |
f∘B |
||
f⍢g |
Dual | |
A⍡ |
Convolution operator | |
A∘/ |
Mask | |
A∘\ |
Mesh | |
Direct definition | ||
∘∇B |
Monadic | |
A∇∘ |
Dyadic | |
A∇B |
Ambivalent |
The Outer Product operator was renamed "Function Table".
Other functionality
- Stranding and stranded assignment syntax were added.
- The primitive array Zilde was introduced.
- The assignment arrow
←
with nothing to the left was used to indicate Sink, which prevented display of a value. - Defined functions were extended to allow an ambivalent case.
- Choose indexing was added.
References
- ↑ Bob Smith. "Nested arrays, operators, and functions" at APL81.
- ↑ Carl M. Cheney. APL*PLUS Nested Arrays System (reference manual). STSC. 1981.
APL dialects [edit] | |
---|---|
Maintained | APL+Win (APL*PLUS) ∙ APL2 ∙ APL64 ∙ APL\iv ∙ April ∙ Co-dfns ∙ Dyalog APL ∙ dzaima/APL ∙ Extended Dyalog APL ∙ GNU APL ∙ NARS2000 ∙ ngn/apl |
Historical | Iverson notation ∙ A Programming Language ∙ A+ (A) ∙ APL# ∙ APL.68000 ∙ APL.SV ∙ APLX ∙ APL\1130 ∙ APL\3000 ∙ APL\360 ∙ APL/700 ∙ NARS ∙ openAPL ∙ Rowan ∙ SAX ∙ SHARP APL∙ VisualAPL (APLNext) ∙ VS APL ∙ York APL |
Derivatives | AHPL ∙ APL\iv ∙ BQN ∙ ELI ∙ I ∙ Ivy ∙ J ∙ Jelly ∙ K (Q, KDB+) ∙ Nial ∙ RAD |