[Jprogramming] Rewriting adverb table
Kip Murray
km at math.uh.edu
Tue Apr 7 06:16:26 HKT 2009
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
More information about the Programming
mailing list