I wanted to model bubble sort.
Here's a first shot. Any improvements?
]C=. 10 [EMAIL PROTECTED] 10
6 5 9 2 4 9 0 7 0 4
/:~ C
0 0 2 4 4 5 6 7 9 9
<./ C
0
(([ ,`(,~)@.> [EMAIL PROTECTED]) , [EMAIL PROTECTED])/ C
0 6 5 9 2 4 9 0 7 4
(([ ,`(,~)@.> [EMAIL PROTECTED]) , [EMAIL PROTECTED])/^:_ C
0 0 2 4 4 5 6 7 9 9
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm