In the vocabulary http://www.jsoftware.com/help/dictionary/d530n.htm the
following example is given:
y=: a.{~(a.i.'A')+i.4 5
m=: 3 1 0 2 1
y;m;m}y
+-----+---------+-----+
|ABCDE|3 1 0 2 1|PGCNJ|
|FGHIJ| | |
|KLMNO| | |
|PQRST| | |
+-----+---------+-----+
But what if n=: 0 2 1 1 3 and I want (n,:m) } y ?
(n,:m)}y
|rank error
| (n,:m)}y
I could do
(n,:m) } ,:"1~y
ALHIT
PGCNJ
but that is neither elegant nor efficient.
R.E. Boss
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm