It is an easy puzzle to produce CP1 below.

The dictionary entry for Catalog ({) offers

   CP=: {@(,&<)
   0 1 CP 2 3 4
+---+---+---+
|0 2|0 3|0 4|
+---+---+---+
|1 2|1 3|1 4|
+---+---+---+

But a better Cartesian product could do this:

   'ht' CP1 'ao' CP1 'gtw'
+---+---+---+
|hag|hat|haw|
+---+---+---+
|hog|hot|how|
+---+---+---+

+---+---+---+
|tag|tat|taw|
+---+---+---+
|tog|tot|tow|
+---+---+---+


Kip Murray
Math, UofHouston

[EMAIL PROTECTED]
http://www.math.uh.edu/~km
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to