Ketil Z. Malde wrote: | (writing his own O(n log n) sortBy as we speak) It might be useful to look at Ralf Hinze's collection of sorting routines, available on his homepage: http://www.cs.uu.nl/~ralf/software.html#sort /Koen.