Also:

'b'([:+/=/&,) 'abcd'
0 1 0 0
   'b' = 'abcd'
0 1 0 0
   
  'bc' ([: +/=/&,) 'abcd'
0 1 1 0
   +./"2 'bc' =/ 'abcd'
0 1 1 0

Linda

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of bob therriault
Sent: Friday, August 31, 2012 1:20 AM
To: [email protected]
Subject: Re: [Jprogramming] emulating e. with +/ and =/

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

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

Reply via email to