2017-05-18 17:18 GMT-03:00 Sven Van Caekenberghe <s...@stfx.eu>: >> On 18 May 2017, at 21:08, Esteban A. Maringolo <emaring...@gmail.com> wrote:
>> Great! How long has it been there? :) > Apparently since 2012 - can't really remember My gosh, I remember searching for that years ago. >> And why is it in SequenceableCollection and not SortedCollection? > Hmm, probably because any SequenceableCollection could be sorted up front, > like in > ((1 to: 100) collect: [ :i | 100 atRandom ]) sort. Ok, makes sense. > BTW, we also have #threeWayCompareTo: (the spaceship operator, aka <=>) > > (((1 to: 100) collect: [ :i | 100 atRandom ]) , #(66)) sort > findBinaryIndex: [ :x | 66 threeWayCompareTo: x ] I think that method is part of the SortFunctions package I ported. It is not in my Pharo 5 image at least. Regards! Esteban A. Maringolo