When using complex numbers, I often want to order them lexicographically
on (real part, imaginary part). J's TAO enables me to do and define verbs
like
leq=:0 1-:/:@:,
max=:{:@:/:~
imax=:{:@:/:
for less than or equal to, maximum, and index of maximum respectively.
I feel that I am missing something, however, and I ought to do it with an
adverb. The spirit of these operations is to use grade, and then carry
out the original operation on the graded array. Or is it just bond?
Best wishes,
John
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm