Raul wrote:

>  Ok, but this only works for the specific illustrated
>  case.
> 
>  For example, consider
>     Y=:   i.4 5 9 1

What output do you expect for that case?  If you clarify the spec, I could 
extend my solution.

>  But perhaps that specific case would be better addressed
>  using i.&:(<@dtb"1).

Myself, I'd use  i.&s:  there.

           X  =:  > ;: 'hi raul this is text'
           Y  =:  > ;: 'is hi'
           
           is =:  i.&s:
           
           X is Y
        3 0
           
           load'strings'
           tb =:  i.&:(<@dtb"1)
           
           X tb Y
        3 0
           
           X  =:  4e5 $ X
           Y  =:  1e3 $ Y
           
           ts =: 6!:2 , 7!:2@:]
           
           ts 'X is Y'
        0.0598878 2.1063e6
           ts 'X tb Y'
        5.77107 6.03786e7
           
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to