Furthermore, if you want a Cartesian product, you should use monad  {   (which 
is defined to produce one).  Thus:


           ]cp=:{  (i.3);i.3
        +---+---+---+
        |0 0|0 1|0 2|
        +---+---+---+
        |1 0|1 1|1 2|
        +---+---+---+
        |2 0|2 1|2 2|
        +---+---+---+
           >cp
        0 0
        0 1
        0 2
        
        1 0
        1 1
        1 2
        
        2 0
        2 1
        2 2
           

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

Reply via email to