Raul has already shown how to use under but here is my original one using it too: rad=: (#~ [: -. 0 , 2 -:/\ ])&.|: :: ]
However I like the ifany approach better in this case rad=: (#~ [: -. 0 , 2 -:/\ ])&.|: ifany rad B The reason that ( ifany B ) gives a syntax error is because ifany is an adverb not a verb and therefore expects a verb to its left. type 'ifany' ┌──────┐ │adverb│ └──────┘ You will get the same error if you execute ( / B ) On Fri, Oct 5, 2012 at 12:44 PM, Linda Alvord <lindaalv...@verizon.net> wrote: > > Ric, Is there a way to modify your function so the result of rad B will > be: > > 3 5 4 > 2 1 6 > > Linda ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm