Or, for people who have disabled x. y. style names:
train=: `:6
substU=: [^:((,'u') -: ]) L:_1 0
(myfn`'' substU ([EMAIL PROTECTED] , {:@u)`'')train
[EMAIL PROTECTED] , {:@myfn
(+/`'' substU ([EMAIL PROTECTED] , {:@u)`'')train
{.@(+/) , {:@(+/)
Also, I hope it's obvious that conjunctions could
be handled similarly (at least for verb arguments)
with a substUV which took a gerund pair (representing
new values for placeholders u and v) as its left argument,
and that placeholders beyond u and v are also possible.
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm