Gerunds are nouns and I'm using a verb to manipulate
them, but need an adjective to convert the result to a verb,
which leaves me with:
train=: `:6
substUV=: 0&{::@[`(1&{::@[)[EMAIL PROTECTED]((;:'u v') i. <@])L:_ 0
pgrPat=: (HdLt u ] v TlLt)`''
(+/`(-/) substUV pgrPat) train
HdLt +/ ] -/ TlLt
Basically, the pattern is:
(gerundA substUV gerundB) train
where substUV and train are defined above,
gerundA represents the two verbs you wish to substitute for u and v,
and gerundB represents the single verb which contains the values
for u and v that you wish to replace.
Note also that u and v must be verbs in this context.
Is that good enough?
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm