Hi June,

The simplest way I can think of is to make both arguments lists using =/&,  . 
That way if you do get an atom you make it a list and it seems to work. 

+/ 'cd' =/ 'abcd'
0 0 1 1
    +/ 'cd' =/&, 'abcd'
0 0 1 1
    +/ 'c' =/&, 'abcd'
0 0 1 0
    +/ 'b' =/&, 'abcd'
0 1 0 0

Or if you would like  to consolidate  into a tacit verb so that you could 
assign it to a variable
     'b' ([:+/=/&,) 'abcd'
0 1 0 0
     'bc' ([: +/ =/&,) 'abcd'
0 1 1 0
     e=: [: +/ =/&,
     'bc' e 'abcd'
0 1 1 0

Cheers, bob
   
On 2012-08-30, at 9:59 PM, June Kim (김창준) wrote:

>  +/ 'cd' =/ 'abcd'

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

Reply via email to