[squeak-dev] The Trunk: Collections-ct.1012.mcz

Levente Uzonyi leves at caesar.elte.hu
Sun Jun 19 20:50:13 UTC 2022


Hi Christoph,

I haven't seen that selector before, but I find it surpising that #(1 2) 
middle = 2 and #(a b c d) middle = #c.
Are those the elements you would expect to be returned?


Levente

On Fri, 17 Jun 2022, commits at source.squeak.org wrote:

> Christoph Thiede uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-ct.1012.mcz
>
> ==================== Summary ====================
>
> Name: Collections-ct.1012
> Author: ct
> Time: 17 June 2022, 10:41:55.471906 pm
> UUID: bb97a774-226a-7f43-b69d-4dfc884a681f
> Ancestors: Collections-lrnp.1011
>
> Implements missing #middle on OrderedDictionary, just like we already have #first, #last, #ninth etc. there for compatibility with SequenceableCollection.
>
> =============== Diff against Collections-lrnp.1011 ===============
>
> Item was added:
> + ----- Method: OrderedDictionary>>middle (in category 'accessing') -----
> + middle
> + 	"Answer the middle element of the receiver."
> + 
> + 	^ self atIndex: self size // 2 + 1!


More information about the Squeak-dev mailing list