Was this the expression?

           expand =: (#~ 1 j. #;._1)~
           'ab' -: 1 0 1 # 1 0 1 expand 'ab'
        1

I found it on lines 5 6 of the file system\examples\phrases\phrc5.ijs :

           1!:11 (jpath '~system\examples\phrases\phrc5.ijs');243 126
        m3 =: 1: j. # ;. _1                 NB. Real 1; Imaginary # of 0's 
between 1's
        d4 =: [EMAIL PROTECTED] # ]                      NB. Expand

Of course, if you just want to do in J what  \  does in APL, use  #^:_1  .  

          'ab' -: 1 0 1 # 1 0 1  #^:_1 'ab'
        1

          (-: ]&.(1 0 1&#^:_1)) 'ab'
        1

By the way,  b.  can't return the inverses of dyads (the party line is that 
dyads do not have inverses).  But if you bond the dyad and use  b. _1  , the 
results sometimes can be informative:

               1&#. b._1
        ($&1@>:@(1&(<[EMAIL PROTECTED]))@(1&>.)@(>./)@:|@, #: ]) :.(1&#.)

but not always:

           1 0 1&# b._1
        1 0 1&#^:_1

-Dan

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

Reply via email to