Re: [Bug-apl] multiple inner product

2016-07-06 Thread Kacper Gutowski
On 6 July 2016 at 20:31, Xiao-Yong Jin wrote: > I’m not sure which one is at fault here. Any idea? The standard explicitly says A f.g B ←→ f/A g B when A & B vectors. A←⊂[1]⍳2 3 B←⊂[1]10×⍳2 3 GNU APL is at fault here: {⍺+.+⍵}/A+B 165 242 (+.+)/A+B 209 198 But in the

Re: [Bug-apl] Recursive Lambda

2016-07-06 Thread Louis de Forcrand
The clearest and most versatile idiom for me would be ⍎ ('case1' 'case2' 'case3' ...)[tests] This acts exactly like a case statement (and by extension like an if/else). For example: '/' {⍎ ('+-×÷')['+-*/' ⍳ ⍺] , '/⍵'} 2 .5 yields 4. If you want to select the corresponding case from a list of tests,

[Bug-apl] multiple inner product

2016-07-06 Thread Xiao-Yong Jin
The following from GNU APL, (⊂[1]⍳2 3)+.+.+⊂[1]10×⍳2 3 209 198 (⊂[1]⍳2 3)(+.+).+⊂[1]10×⍳2 3 209 198 (⊂[1]⍳2 3)+.(+.+)⊂[1]10×⍳2 3 33 66 66 66 do not agree with Dyalog APL, ⎕ML 3 (⊂[1]⍳2 3)+.+.+⊂[1]10×⍳2 3 165 242 (⊂[1]⍳2 3)(+.+).+⊂[1]10×⍳2 3 165

Re: [Bug-apl] inner product with dfn

2016-07-06 Thread Juergen Sauermann
Hi Xiao-Yong, thanks, fixed in SVN 771. /// Jürgen On 07/05/2016 10:12 PM, Xiao-Yong Jin wrote: Hi, here goes another micro error. 2 3+.{⍺×⍵}2 3 LENGTH ERROR μ-Z__A_LO_INNER_RO_B[5] (μ-IA μ-IB)←⊃μ-I[μ-N]

Re: [Bug-apl] Recursive Lambda

2016-07-06 Thread Juergen Sauermann
Hi Kacper, I agree. I was also thinking of the power operator but then could not find the right way of using it. Your solution is very elegant and clear. /// Jürgen On 07/06/2016 03:10 AM, Kacper Gutowski wr