I want to write a function that will take a rank 2 array and then find
all the possible sums, taking one number from each row. After much
puzzlement I finally figured out that +// was the likely the direction
I wanted, and based half on my own limited understanding of how to
make things tacit and half on 13 : here's what I have so far:
f=:[: ~. ([: ~. [: , +/)/
c=: i.5 3
f c
15 16 17 18 19 20 21 22 23 24 25 26 27
Does that seem like the right way to go? (I can't even begin to figure
out how to replace those caps with @ and @:
regards,
Geoff
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm