On Wed, 23 Dec 2009, Adrian Kuhn wrote:
Stéphane Ducasse <stephane.ducasse@...> writes:
I started to implement OrderedSet (OrderedCollection no duplicate) but I think that I want probably UniqueOrdered. I will publish what I have done and ask for feedback and that other can improve. I like the idea of using the TraitsTest to have coherent sets of behavior.
Oh yeah, TreeSet ftw, missed that already sometime!
asSortedArray asSortedCollection asSortedCollection: sortBy:
What bugs me is that #sortBy: does not what it says. I would expect that aCollection sortBy: [ :each | each name ] does the same as aCollection sort: [ :a :b | a name <= b name ] if you want that, I can provide a fast implementation of #sortBy: Not all collections are sortable and #sort: is sorting in-place, so it's hardly doable. Levente --AA _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project