<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Levente, Hi Marcel,</p>
<p><br>
</p>
<p><span style="font-size: 12pt;">> </span><span style="font-size: 12pt;">Are those the elements you would expect to be returned?</span><br>
</p>
<p></p>
<div><br>
</div>
<div>For me, they are. However, I would also not care about 
<div>#(1 2) <span style="font-size: 12pt;">middle = 1 and #(a b c d) middle = #b.</span></div>
When I send #middle, I think of #anyOneAboutInTheMiddle. I used this in a few scripts where I wanted to get a sample that is neither from the beginning nor from the end of the collection.</div>
<div>Maybe #anyOneInMiddle would be a better name?</div>
<div><br>
</div>
<div>
<p style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
> <span style="font-size: 12pt;">I think we should discuss this after the release and maybe move it to Inbox for now?</span></p>
<div><br>
</div>
<div>I accept that the existence and behavior of #middle might be questionary. However, this version does not introduce a new feature, it just fixes an incompatibility issue between SequenceableCollection and OrderedDictionary. I am open to any changes to SequenceableCollectino
 >> #middle, but until we address this, can't we just ensure basic polymorphism between these two classes? I don't see how this would hurt.</div>
<p></p>
<p style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
<br>
</p>
> <span>2. Even #median on SortedCollection is not correct in the math domain.</span></div>
<div><span><br>
</span></div>
<div><span>Fair point, let's address this separately.</span></div>
<div><span><br>
</span></div>
<div><span>Best,</span></div>
<div><span>Christoph</span></div>
<p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Montag, 20. Juni 2022 10:31:17<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Trunk: Collections-ct.1012.mcz</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Hi Christoph --
<div class="mb_sig"></div>
<div><br>
</div>
<div>I think we should discuss this after the release and maybe move it to Inbox for now?</div>
<div><br>
</div>
<div>1. I don't think that #middle can be provided reasonably for an arbitrary SequenceableCollection. The +/- 1 index is probably surprising for the user.</div>
<div><br>
</div>
<div>2. Even #median on SortedCollection is not correct in the math domain. Shouldn't be the median of #(8 7 5 4 2 1) be 4.5 because there is an even number of elements? Hmm...</div>
<div><br>
</div>
<div>Hmm....</div>
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
<blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 17.06.2022 22:43:14 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">Christoph Thiede uploaded a new version of Collections to project The Trunk:<br>
http://source.squeak.org/trunk/Collections-ct.1012.mcz<br>
<br>
==================== Summary ====================<br>
<br>
Name: Collections-ct.1012<br>
Author: ct<br>
Time: 17 June 2022, 10:41:55.471906 pm<br>
UUID: bb97a774-226a-7f43-b69d-4dfc884a681f<br>
Ancestors: Collections-lrnp.1011<br>
<br>
Implements missing #middle on OrderedDictionary, just like we already have #first, #last, #ninth etc. there for compatibility with SequenceableCollection.<br>
<br>
=============== Diff against Collections-lrnp.1011 ===============<br>
<br>
Item was added:<br>
+ ----- Method: OrderedDictionary>>middle (in category 'accessing') -----<br>
+ middle<br>
+ "Answer the middle element of the receiver."<br>
+ <br>
+ ^ self atIndex: self size // 2 + 1!<br>
<br>
<br>
</div>
</blockquote>
</div>
</div>
</body>
</html>