Makes sense. The standard specification is so weird that it must be considered broken.
Frankly, I'd love to hear the discussions that preceeded its inclusion in the standard. :-) Regards, Elias On 2 July 2014 23:19, Juergen Sauermann <[email protected]> wrote: > Hi, > > I have changed the rank operator with axis, i.e. ⍤[X]. > > The old implementation tried to improve on the somewhat broken > syntax specified in the ISO standard: > > * A ⍤[y] B ←→ A ⍤ y B* > * ⍤[y] B ←→ ⍤ y B* > > The new implementation follows NARS which uses *⊂[X] *instead of *⊂* > when conforming the final result. > > Note that the "flat" format like *A ⍤ y B *can give surprising results, so > you should always put the operator arguments in parentheses like > *(A ⍤ y) B *for clarity. > > The current implementation (axis or not) binds *y* to *B* and not to *⍤*, > so > *A ⍤ y B* means *A ⍤ (y B)* and not *(A ⍤ y) B*. The "correct" binding > of APL2 > would read a simple thing as *A ⍤ 1 2 3 B *as *(A ⍤ 1)(2 3 B) *which > might surprise > less-frequent users of *⍤*. > > It is unknown how APL2 itself would handle this because they haven't > implemented ⍤ > (or any other primitive operator with a value instead of a function as the > right function > argument). > > /// Jürgen > > > >
