January 2018

S M T W T F S
  123456
78910111213
14151617181920
21222324252627
28293031   

Style Credit

Expand Cut Tags

No cut tags
Saturday, October 28th, 2006 04:37 pm (UTC)
OK, I've never used either language, and don't have interpreters to hand. So I could be wrong, and anyway, I was talking more about the approach to programming rather than the actual APL outer product operation. But my understanding is that the outer product in APL despatches at run-time on the dimensions of its argument, so if R is an n1*...*nj array and S is an m1*...*mk array, then o.x R S is an n1*...*nj*m1*...*mk array. I don't know if there's a version of outer product which takes a functional argument, but I expect so (and almost certainly in J, which is apparently influenced heavily by functional languages).

There's an excellent explanation of an APL program on this page (http://www.chilton.com/~jimw/setgame.html) - I found it pretty mindblowing when I first read it. I want to learn APL/J at some point for the same reason that I want to learn Haskell better - to expand my mind, and give me new ways of thinking about programming. Though they're using the word "monad" to mean "unary function", which I'm afraid I can't support :-)

Reply

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting