<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi Eliot,</p>
<p><br>
</p>
<p>not sure if I understand you correctly. You suggest to be as generic as possible, or you don't?</p>
<p>I think as we already define #at:ifAbsent: and #at:ifPresent:ifAbsent: on SequenceableCollection, it would be only consistent to implement #at:ifPresent: here as well.</p>
<p><br>
</p>
<p>What should be a KeyedCollection? KeyedSet already implements #at:ifPresent:.</p>
<p><br>
</p>
<p>> <span>Would it not work if implemented in Collection itself?</span></p>
<p><span><br>
</span></p>
<p><span>I cannot imagine, because for example, a Set does not implement #at: ...</span></p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">
<div class="x__rp_U4 x_ms-font-weight-regular x_ms-font-color-neutralDark x_rpHighlightAllClass x_rpHighlightBodyClass" id="x_Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="x_divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="x_Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><br>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">Best,</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">Christoph</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Eliot Miranda <eliot.miranda@gmail.com><br>
<b>Gesendet:</b> Montag, 20. Januar 2020 03:52:52<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Collections-ct.872.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Christoph,<br>
<br>
<br>
> On Jan 19, 2020, at 3:26 PM, commits@source.squeak.org wrote:<br>
> <br>
> Christoph Thiede uploaded a new version of Collections to project The Inbox:<br>
> <a href="http://source.squeak.org/inbox/Collections-ct.872.mcz">http://source.squeak.org/inbox/Collections-ct.872.mcz</a><br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: Collections-ct.872<br>
> Author: ct<br>
> Time: 20 January 2020, 12:26:15.859545 am<br>
> UUID: 9d48e360-1121-6541-ba00-1d06311f2f0c<br>
> Ancestors: Collections-nice.870<br>
> <br>
> Implement #at:ifPresent: on SequenceableCollection<br>
> <br>
> Text theQuickBrownFox at: 42 ifPresent: [:char |<br>
>    self inform: ({char.char} joinSeparatedBy: $.) asUppercase].<br>
> <br>
> =============== Diff against Collections-nice.870 ===============<br>
> <br>
> Item was added:<br>
> + ----- Method: SequenceableCollection>>at:ifPresent: (in category 'accessing') -----<br>
> + at: index ifPresent: aBlock<br>
> + <br>
> +    ^ self at: index ifPresent: aBlock ifAbsent: []!<br>
<br>
Why is this in SequenceableCollection abd not KeyedCollection?  Would it not work if implemented in Collection itself? Methods shouldn’t as general as possible. For e smoke, just because one needs a method to operate in Strings doesn’t mean it is t more useful
 higher up in ArrayedCollection.  Thought extended here pays dividends later on.<br>
<br>
> <br>
> <br>
<br>
</div>
</span></font>
</body>
</html>