I asked about this on Stack Overflow and was told it might be a bug in GNU APL. 
I'm a beginner so I don't know enough to say.

Basically, this works:

      2+/1 2 3 4 5
┌→──────┐
│3 5 7 9│
└───────┘
This works too:

     2{⍺+⍵}/1 2 3 4 5
┌→──────┐
│3 5 7 9│
└───────┘
This seems like it should to my amateur eyes, but it does not:

      ∇R←X FOO Y
         R←X+Y
      ∇

      2FOO/1 2 3 4 5
SYNTAX ERROR
μ-Z__pA_LO_REDUCE_X4_B[3]  μ-T←⊂(⊃μ-B3[μ-H;μ-a-μ-M;μ-L])μ-LO⊃μ-T
                           ^    ^
Whether it's a bug or not, I would like to know more about how to interpret the 
stuff APL gives back after the syntax error. I did not see an obvious 
relationship between my code and that message.

Stack Overflow link: 
https://stackoverflow.com/questions/46780195/reduce-by-two-with-named-function

Thanks for your time,

-- 
Daniel Lyons




Reply via email to