On Wed, Dec 23, 2009 at 4:58 PM, Adrian Kuhn <akuhn@iam.unibe.ch> 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:
In those cases will be cool to write first all the tests than make the things to fail and then write the code to fix them :) But ok...not everybody have that time.
--AA
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project