I can insert a number of verbs into a numerical list and evaluate the sentence
ops=: +`*`-
ops / 1 2 3 4
_1
((0 2 1){ops) / 1 2 3 4
_9
Now I want to do both at once using a table of verbs:
(0 1 2,:0 2 1){ops
+-+-+-+
|+|*|-|
+-+-+-+
|+|-|*|
+-+-+-+
((0 1 2,:0 2 1){ops) / 1 2 3 4
|rank error
| ((0 1 2,:0 2 1){ops)/1 2 3 4
((0 1 2,:0 2 1){ops) /"1 _] 1 2 3 4
|rank error
| ((0 1 2,:0 2 1){ops)/"1 _]1 2 3 4
The answer I would want is:
_1 _9
I've also tried to use boxing, and `:3 with no luck.
Is this possible?
Ideally I want be able to do an outer-product of verb permutations and numeric
permutations
along the lines of:
((0 1 2,:0 2 1){ops) /"1 _] 1 2 3 4,:1 2 4 3
Thanks in advance.
Ric
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm