Leading axis theory: Difference between revisions

Jump to navigation Jump to search
381 bytes added ,  14:24, 16 January 2020
Line 36: Line 36:


{|class=wikitable
{|class=wikitable
! Functions                                !! [[SHARP APL]] !!style="min-width:5em"| [[A+]]  !! [[Dyalog APL]]
! Functions                                !! [[SHARP APL]]       !! [[Dyalog APL]]      !!style="min-width:5em"| [[A+]]  !!style="min-width:5em"| [[J]]
|-
|-
| [[Take]], [[Drop]]                      || {{Yes|19.0}} || {{Yes}}                        || {{Yes|13.0}}
| [[Take]], [[Drop]]                      || {{Yes|19.0}}       || {{Yes|13.0}}        || {{Yes}}                        || {{Yes}}
|-
|-
| [[Indexing]] function                    || {{Yes|19.0}} || {{Yes}}                        || {{Yes|13.0}}
| [[Indexing]] function                    || {{Yes|19.0}}       || {{Yes|13.0}}        || {{Yes}}                        || {{Yes}}
|-
|-
| [[Bracket indexing]]                    || {{No}}       || {{Yes}}                       || {{No}}
| [[Bracket indexing]]                    || {{No}}             || {{No}}             || {{Yes}}                       ||style="text-align:center;"| N/A
|-
|-
| [[Scalar dyadic]]s                      || {{Yes}}       || {{No}}                        || {{No}}
| [[Scalar dyadic]]s                      || {{Yes}}             || {{No}}              || {{No}}                        || {{Yes}}
|-
|-
| [[Index Of]]                            || {{No|No*}}   || {{Yes}}                        || {{Yes|14.0}}
| [[Index Of]]                            || {{No|Incompatible}} || {{Yes|14.0}}        || {{Yes}}                        || {{Yes}}
|-
|-
| [[Unique]]                               || {{Yes}}       ||style="text-align:center;"| N/A || {{Yes|17.0}}
| [[Membership]]                           || {{No|Incompatible}} || {{No|Incompatible}} || {{Yes}}                        || {{Yes}}
|-
|-
| [[Union]], [[Intersection]], [[Without]] || {{No}}       ||style="text-align:center;"| N/A || {{No}}
| [[Unique]]                              || {{Yes}}            || {{Yes|17.0}}        ||style="text-align:center;"| N/A || {{Yes}}
|-
| [[Union]], [[Intersection]], [[Without]] || {{No}}             || {{No}}              ||style="text-align:center;"| N/A || {{Yes}}
|}
|}


[[Index Of]] in [[SHARP APL]] was not extended to apply to left argument [[major cell]]s as in J and Dyalog; instead it was given rank <source lang=apl inline>1 0</source> making such a change impossible. In [[A+]] not only [[Index Of]] but also [[Membership]] was changed to follow the leading axis model, breaking compatibility with other APLs. A+ also restricts [[Take]] and [[Drop]] to allow only a [[singleton]] left argument (but any right argument rank is permitted). The leading-axis extension of scalar dyadics in SHARP is a direct consequence of given them a function rank 0, as SHARP's concept of function rank includes [[prefix agreement]].
[[Index Of]] in SHARP APL was not extended to apply to left argument [[major cell]]s as in J and Dyalog; instead it was given rank <source lang=apl inline>1 0</source> making such a change impossible. In A+ not only [[Index Of]] but also [[Membership]] was changed to follow the leading axis model, breaking compatibility with other APLs. A+ also restricts [[Take]] and [[Drop]] to allow only a [[singleton]] left argument (but any right argument rank is permitted). The leading-axis extension of scalar dyadics in SHARP is a direct consequence of giving them a function rank 0, as SHARP's concept of function rank includes [[prefix agreement]].


== History ==
== History ==

Navigation menu