Thank you, Fraser, very clear and helpful. I now see why my attempt involving x and y did not
work. /Kip
Fraser Jackson wrote:
I suspect the difficulty arose because of the need to recognise that table
is an ambivalent verb. I admire the skill of members of the forum with the
tacit form but I think the simplest thing to do is to recognise that table
is an ambivalent adverb and write the obvious expressions for the formatted
result. Dan of course achieved this in a different and very elegant way.
tab =: 1 : 0
1 1}. _1 _1 }. ": y u table y
:
1 1}. _1 _1 }. ": x u table y
)
- tab i.4
-|0 1 2 3
-+----------
0|0 _1 _2 _3
1|1 0 _1 _2
2|2 1 0 _1
3|3 2 1 0
- tab ~ i.4
-|0 1 2 3
-+----------
0|0 _1 _2 _3
1|1 0 _1 _2
2|2 1 0 _1
3|3 2 1 0
Fraser
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm