[squeak-dev] The Inbox: Collections-ct.947.mcz

Levente Uzonyi leves at caesar.elte.hu
Thu Jun 10 19:15:14 UTC 2021

Hi Christoph,

On Thu, 10 Jun 2021, commits at source.squeak.org wrote:

> A new version of Collections was added to project The Inbox:
> http://source.squeak.org/inbox/Collections-ct.947.mcz
> ==================== Summary ====================
> Name: Collections-ct.947
> Author: ct
> Time: 10 June 2021, 8:40:58.780588 pm
> UUID: cb2cdf00-2a3a-5d46-bf15-60255480c1fa
> Ancestors: Collections-eem.944
> Proposal: Adds sort function that uses a boolean compare block such as [:a :b | a <= b].
> Usage examples:
> 	squotVersions sorted: [:a :b | historyWalker shouldVisit: a before: b] asCompareSortFunction.
> 	#(true nil 42) sorted: #compareSafely: asCompareSortFunction.

#sort: and #sorted: expect an argument which responds to #value:value: 
with a boolean, so both of those examples work if you don't send
#asCompareSortFunction to the block.

However, #asCompareSortFunction may be useful if you want to create 
chained sort functions. I'm not sure about the name though.


More information about the Squeak-dev mailing list