Operators and Functions: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
! Glyph                              !! Monadic              !! Dyadic
! Glyph                              !! Monadic              !! Dyadic
|-
|-
| <source lang=apl inline><</source> || [[Enclose]]          ||
| <syntaxhighlight lang=apl inline><</source> || [[Enclose]]          ||
|-
|-
| <source lang=apl inline>></source> || [[Disclose]]          ||
| <syntaxhighlight lang=apl inline>></source> || [[Disclose]]          ||
|-
|-
| <source lang=apl inline>∪</source> || [[Nub]]              || [[Union]]
| <syntaxhighlight lang=apl inline>∪</source> || [[Nub]]              || [[Union]]
|-
|-
| <source lang=apl inline>∩</source> || Ordered Nub          || [[Intersection]]
| <syntaxhighlight lang=apl inline>∩</source> || Ordered Nub          || [[Intersection]]
|-
|-
| <math>\cup\!\!\!\!-</math>        || Distribution          ||
| <math>\cup\!\!\!\!-</math>        || Distribution          ||
Line 17: Line 17:
| <math>\cap\!\!\!\!-</math>        || Ordered Distribution  ||
| <math>\cap\!\!\!\!-</math>        || Ordered Distribution  ||
|-
|-
| <source lang=apl inline>~</source> ||                      || [[Set Difference]]
| <syntaxhighlight lang=apl inline>~</source> ||                      || [[Set Difference]]
|-
|-
| <source lang=apl inline>⊆</source> || Inclusion            ||
| <syntaxhighlight lang=apl inline>⊆</source> || Inclusion            ||
|-
|-
| <source lang=apl inline>⊇</source> || Inclusion            ||
| <syntaxhighlight lang=apl inline>⊇</source> || Inclusion            ||
|-
|-
| <source lang=apl inline>⊂</source> || Strict inclusion      ||
| <syntaxhighlight lang=apl inline>⊂</source> || Strict inclusion      ||
|-
|-
| <source lang=apl inline>⊃</source> || Strict inclusion      ||
| <syntaxhighlight lang=apl inline>⊃</source> || Strict inclusion      ||
|-
|-
| <source lang=apl inline>⌷</source> || Indexing              ||
| <syntaxhighlight lang=apl inline>⌷</source> || Indexing              ||
|}
|}


Line 34: Line 34:
! Syntax                                !! Monadic call              !! Dyadic call
! Syntax                                !! Monadic call              !! Dyadic call
|-
|-
| <source lang=apl inline>f⍣B</source>  || [[Power (operator)|Power]] ||
| <syntaxhighlight lang=apl inline>f⍣B</source>  || [[Power (operator)|Power]] ||
|-
|-
| <source lang=apl inline>f⍣∘</source>  || Identity function (e.g. <source lang=apl inline>+</source> to <source lang=apl inline>×</source>) ||
| <syntaxhighlight lang=apl inline>f⍣∘</source>  || Identity function (e.g. <syntaxhighlight lang=apl inline>+</source> to <syntaxhighlight lang=apl inline>×</source>) ||
|-
|-
| <source lang=apl inline>f⍨</source>  ||                            || [[Commute]]
| <syntaxhighlight lang=apl inline>f⍨</source>  ||                            || [[Commute]]
|-
|-
| <source lang=apl inline>̈∆</source>    ||colspan=2| Domain
| <syntaxhighlight lang=apl inline>̈∆</source>    ||colspan=2| Domain
|-
|-
| <source lang=apl inline>f⍤a</source>  ||colspan=2| Nuax
| <syntaxhighlight lang=apl inline>f⍤a</source>  ||colspan=2| Nuax
|-
|-
| <source lang=apl inline>f⍥a</source>  ||colspan=2| Coax
| <syntaxhighlight lang=apl inline>f⍥a</source>  ||colspan=2| Coax
|-
|-
| <source lang=apl inline>f⍢g</source>  ||colspan=2| [[Dual]]
| <syntaxhighlight lang=apl inline>f⍢g</source>  ||colspan=2| [[Dual]]
|-
|-
| <source lang=apl inline>f¨g</source>  ||colspan=2| [[Over|Composition]]
| <syntaxhighlight lang=apl inline>f¨g</source>  ||colspan=2| [[Over|Composition]]
|-
|-
| <source lang=apl inline>f/</source>  ||                            || (Windowed) [[Windowed Reduction|Reduction]]
| <syntaxhighlight lang=apl inline>f/</source>  ||                            || (Windowed) [[Windowed Reduction|Reduction]]
|-
|-
| <source lang=apl inline>f\</source>  ||                            || (Windowed) Scan
| <syntaxhighlight lang=apl inline>f\</source>  ||                            || (Windowed) Scan
|-
|-
| <source lang=apl inline>f⌿</source>  ||                            || (Windowed) [[Windowed Reduction|Reduction]]
| <syntaxhighlight lang=apl inline>f⌿</source>  ||                            || (Windowed) [[Windowed Reduction|Reduction]]
|-
|-
| <source lang=apl inline>f⍀</source>  ||                            || (Windowed) Scan
| <syntaxhighlight lang=apl inline>f⍀</source>  ||                            || (Windowed) Scan
|-
|-
| <source lang=apl inline>f∆</source>  || Derivative                || Difference
| <syntaxhighlight lang=apl inline>f∆</source>  || Derivative                || Difference
|-
|-
| <source lang=apl inline>̄:</source>    ||colspan=2| [[Variant]]
| <syntaxhighlight lang=apl inline>̄:</source>    ||colspan=2| [[Variant]]
|-
|-
| <math>\vee\!\!\!\!\wedge</math>      ||                            || Boolean
| <math>\vee\!\!\!\!\wedge</math>      ||                            || Boolean

Revision as of 22:12, 10 September 2022

Operators and Functions is a research report published by Ken Iverson in 1978, collecting a set of operators and functions he had developed over the preceding years. Released two years before Iverson left IBM for I.P. Sharp over differences regarding the direction of APL, it offers precursors for many of the ideas later developed in SHARP APL. Its primitives were used more directly in NARS, which influenced Dyalog APL and in this way shaped much of present-day APL development.

Functions:

Glyph Monadic Dyadic
<syntaxhighlight lang=apl inline><</source> Enclose
<syntaxhighlight lang=apl inline>></source> Disclose
<syntaxhighlight lang=apl inline>∪</source> Nub Union
<syntaxhighlight lang=apl inline>∩</source> Ordered Nub Intersection
Distribution
Ordered Distribution
<syntaxhighlight lang=apl inline>~</source> Set Difference
<syntaxhighlight lang=apl inline>⊆</source> Inclusion
<syntaxhighlight lang=apl inline>⊇</source> Inclusion
<syntaxhighlight lang=apl inline>⊂</source> Strict inclusion
<syntaxhighlight lang=apl inline>⊃</source> Strict inclusion
<syntaxhighlight lang=apl inline>⌷</source> Indexing

Operators:

Syntax Monadic call Dyadic call
<syntaxhighlight lang=apl inline>f⍣B</source> Power
<syntaxhighlight lang=apl inline>f⍣∘</source> Identity function (e.g. <syntaxhighlight lang=apl inline>+</source> to <syntaxhighlight lang=apl inline>×</source>)
<syntaxhighlight lang=apl inline>f⍨</source> Commute
<syntaxhighlight lang=apl inline>̈∆</source> Domain
<syntaxhighlight lang=apl inline>f⍤a</source> Nuax
<syntaxhighlight lang=apl inline>f⍥a</source> Coax
<syntaxhighlight lang=apl inline>f⍢g</source> Dual
<syntaxhighlight lang=apl inline>f¨g</source> Composition
<syntaxhighlight lang=apl inline>f/</source> (Windowed) Reduction
<syntaxhighlight lang=apl inline>f\</source> (Windowed) Scan
<syntaxhighlight lang=apl inline>f⌿</source> (Windowed) Reduction
<syntaxhighlight lang=apl inline>f⍀</source> (Windowed) Scan
<syntaxhighlight lang=apl inline>f∆</source> Derivative Difference
<syntaxhighlight lang=apl inline>̄:</source> Variant
Boolean

External links

APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLDyalog APL Visiondzaima/APLGNU APLKapNARS2000PometoTinyAPL
Historical A Programming LanguageA+ (A) ∙ APL#APL2CAPL\360APL/700APL\1130APL\3000APL.68000APL*PLUSAPL.jlAPL.SVAPLXExtended Dyalog APLIverson notationIVSYS/7090NARSngn/aplopenAPLOperators and FunctionsPATRowanSAXSHARP APLRationalized APLVisualAPL (APLNext) ∙ VS APLYork APL
Derivatives AHPLBQNCoSyELIGleeIIvyJJellyK (Goal, Klong, Q) ∙ KamilaLispLang5LilNialRADUiua
Overviews Comparison of APL dialectsTimeline of array languagesTimeline of influential array languagesFamily tree of array languages