2009/7/21 Raul Miller rauldmiller at gmail.com:
> ...... but this can be achieved with
> v0`v1`v2}~ y
>
> Unfortunately, this also typically requires v0, v1, and v2 all end
> with @] which is rather verbose...
one possible way to reduce verbosisisity:
A=: 1 : 0
'a b c'=.u
a=. (<a) 5!:0 @[
b=. (<b) 5!:0 @[
c=. (<c) 5!:0 @[
(a f.)`(b f.)`(c f.)}~
)
{:`([:I. {.=])`]A 'purple';'red';'blue';'red';'purple';'green';'black'
+-----+---+----+---+-----+-----+-----+
|black|red|blue|red|black|green|black|
+-----+---+----+---+-----+-----+-----+
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm