June Kim wrote:
> Could you suggest easier way of doing this? I especially don't like
> the verb l and wish to have a purely tacit one.
>
>   n=: 0&, ~: ,&0
>   v=: (] ,~ ' ' $~ [)
>   l=: 13 : '(n&.>)^:(i.y) < 1'
>   xortr=:[: > ([: |. i.) v&.> [: ":&.> l

This might give you some ideas:

   (i. 7) n&.>@]^:[ < 1
+-+---+-----+-------+---------+-----------+-------------+
|1|1 1|1 0 1|1 1 1 1|1 0 0 0 1|1 1 0 0 1 1|1 0 1 0 1 0 1|
+-+---+-----+-------+---------+-----------+-------------+
   (-i.-7)|."_1":@>(i. 7) n&.>@]^:[ < 1
      1      
     1 1     
    1 0 1    
   1 1 1 1   
  1 0 0 0 1  
 1 1 0 0 1 1 
1 0 1 0 1 0 1

-- 
Raul

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

Reply via email to