Sort[{1,2,3,4},Abs[#1-#2]>1&]
- To: mathgroup at yoda.physics.unc.edu
- Subject: Sort[{1,2,3,4},Abs[#1-#2]>1&]
- From: Michael.Trott at physik.tu-ilmenau.de
- Date: Mon, 23 Nov 1992 19:03:21 +0000
Hi Mathgroup, the above yields {2,1,4,3}, what is not what I wanted . I would like to see for instance {3,1,4,2}. I think this happens because only adjacent pairs are compared AND REORDERD. But Sort[{1,2,3,4},False] gives {1,2,3,4}. Can somebody tell me when Mma reorders the members of the list. Thanks Michael Trott trott at physik.tu-ilmenau.de