<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>Ah, thank you!</p>
<p><br>
</p>
<p>Then this can be moved to Treated.</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>
<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 Levente Uzonyi <leves@caesar.elte.hu><br>
<b>Gesendet:</b> Montag, 30. Dezember 2019 15:27:28<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Collections-ct.870.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Mon, 30 Dec 2019, commits@source.squeak.org wrote:<br>
<br>
> A new version of Collections was added to project The Inbox:<br>
> <a href="http://source.squeak.org/inbox/Collections-ct.870.mcz">http://source.squeak.org/inbox/Collections-ct.870.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: Collections-ct.870<br>
> Author: ct<br>
> Time: 30 December 2019, 3:01:24.515602 pm<br>
> UUID: cb75296c-0850-d440-97a6-fc1962eef672<br>
> Ancestors: Collections-nice.868<br>
><br>
> Proposal: Refine Dictionary >> #at:ifPresent: not to require an one-arg block.<br>
><br>
> Usage example:<br>
>        Smalltalk at: className ifPresent: [self inform: 'Class already exists'. ^ nil].<br>
<br>
That is what Dictionary >> #includesKey: is for:<br>
<br>
         (Smalltalk includesKey: className) ifTrue: [self inform: 'Class already exists'. ^ nil].<br>
<br>
Btw, classes should be looked up with #hasClassNamed::<br>
<br>
         (Smalltalk hasClassNamed: className) ifTrue: [self inform: 'Class already exists'. ^ nil].<br>
<br>
<br>
Levente<br>
<br>
><br>
> =============== Diff against Collections-nice.868 ===============<br>
><br>
> Item was changed:<br>
>  ----- Method: Dictionary>>at:ifPresent: (in category 'accessing') -----<br>
>  at: key ifPresent: aBlock<br>
>        "Lookup the given key in the receiver. If it is present, answer the value of evaluating the given block with the value associated with the key. Otherwise, answer nil."<br>
><br>
>        | v |<br>
>        v := self at: key ifAbsent: [^ nil].<br>
> +      ^ aBlock cull: v<br>
> -      ^ aBlock value: v<br>
>  !<br>
<br>
</div>
</span></font>
</body>
</html>