Verb f below is an example of "Subtle J".  Is there a "Simple J" way?

I first saw verb f in a note from Linda Alvord.

    f=: 13 :'x&(+./@E.)&>y'

    'bc' f 'a bc def';'ab cde f';'abc d ef'
1 0 1

As you see, f tells which strings on the right contain the left string.

Experienced J users know that f operates by first forming the verb
x&(+./@E.)&> and then applying that verb to y .  They also know "that 
verb" will be applied to each box in y independently of the others and 
the separate results assembled into the final answer.

Is there a way to do it using mostly trains and rank?  A "Simple J" way 
for less experienced users?

You hear the plea of an ex college teacher who dealt with less 
experienced users!

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to