<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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>Now a possible question could be whether we favor deduplication over performance, for example in the #atLast:ifAbsent:. Opinions? :-)</p>
<p><br>
</p>
<p>Tests will be added on request.</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">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</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 commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Freitag, 31. Januar 2020 11:53:16<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: Collections-ct.873.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Christoph Thiede uploaded a new version of Collections to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Collections-ct.873.mcz">http://source.squeak.org/inbox/Collections-ct.873.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Collections-ct.873<br>
Author: ct<br>
Time: 31 January 2020, 11:53:15.549625 am<br>
UUID: 431b3440-c343-7949-b8c4-c5627d640b36<br>
Ancestors: Collections-nice.870<br>
<br>
Extends #atLast: protocol on SequenceableCollection by implementing complete ifPresent:Absent: pattern.<br>
<br>
See also Collections-ct.872.<br>
<br>
=============== Diff against Collections-nice.870 ===============<br>
<br>
Item was changed:<br>
  ----- Method: SequenceableCollection>>atLast:ifAbsent: (in category 'accessing') -----<br>
+ atLast: indexFromEnd ifAbsent: aBlock<br>
- atLast: indexFromEnd ifAbsent: block<br>
-        "Return element at indexFromEnd from the last position.<br>
-         atLast: 1 ifAbsent: [] returns the last element"<br>
  <br>
+        ^ self<br>
+                atLast: indexFromEnd<br>
+                ifPresent: [:element | element]<br>
+                ifAbsent: aBlock!<br>
-        ^ self at: self size + 1 - indexFromEnd ifAbsent: block!<br>
<br>
Item was added:<br>
+ ----- Method: SequenceableCollection>>atLast:ifPresent: (in category 'accessing') -----<br>
+ atLast: indexFromEnd ifPresent: elementBlock<br>
+ <br>
+        ^ self<br>
+                at: self size + 1 - indexFromEnd<br>
+                ifPresent: elementBlock<br>
+                ifAbsent: []!<br>
<br>
Item was added:<br>
+ ----- Method: SequenceableCollection>>atLast:ifPresent:ifAbsent: (in category 'accessing') -----<br>
+ atLast: indexFromEnd ifPresent: elementBlock ifAbsent: exceptionBlock<br>
+        "Answer the value of elementBlock on the element at indexFromEnd from the last position. If the receiver does not contain an element at this position, answer the result of evaluating exceptionBlock."<br>
+ <br>
+        ^ self<br>
+                at: self size + 1 - indexFromEnd<br>
+                ifPresent: elementBlock<br>
+                ifAbsent: exceptionBlock!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>