sortOn package:turtle

Return a list of the elements of the given Shell, sorted after applying the given function and keeping duplicates:
>>> sortOn id (select [1,4,2,3,3,7])
[1,2,3,3,4,7]