<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 Marcel,</p>
<p><br>
</p>
<p>I understand that we are unlikely to reach full polymorph as long as every code needs to be duplicated. Traits for all the conveniences methods *might* be an option, but I also understand that we seem not to want to make use of Traits here. :-)</p>
<p><br>
</p>
<p>Anyway, I use #collect:thenDo: as often as #<span>select:thenCollect: and this inconsistency/ununderstood messages were striking me repeatedly. I don't think that these few convenience selectors in their own protocol actually hurt, do they? :-) Also, converting
 to a collection is not always an option when performance matters.</span></p>
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></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> Donnerstag, 27. Januar 2022 11:13:17<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Trunk: Collections-ct.980.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><br>
</div>
<div>I don't think that we should port all convenience methods from Collection to here. Just the core. At least, that was my thinking, when I added the "collections - enumerating" back then. I deliberately chose not to add such things to not bloat the Stream
 interface any further.</div>
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
<div class="mb_sig"></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 26.01.2022 21:46:25 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.980.mcz<br>
<br>
==================== Summary ====================<br>
<br>
Name: Collections-ct.980<br>
Author: ct<br>
Time: 26 January 2022, 9:46:11.770407 pm<br>
UUID: 465bffe2-5612-4c40-974b-33bd5ec2dbbd<br>
Ancestors: Collections-mt.978<br>
<br>
Improves polymorphy between Collection and Stream by adding missing convenience selectors on the latter. We already have #select:thenCollect: there, so this is just a logical complement.<br>
<br>
=============== Diff against Collections-mt.978 ===============<br>
<br>
Item was added:<br>
+ ----- Method: Stream>>collect:thenDo: (in category 'collections - enumerating') -----<br>
+ collect: collectBlock thenDo: doBlock <br>
+ <br>
+ ^ (self collect: collectBlock) do: doBlock!<br>
<br>
Item was added:<br>
+ ----- Method: Stream>>collect:thenSelect: (in category 'collections - enumerating') -----<br>
+ collect: collectBlock thenSelect: selectBlock<br>
+ <br>
+ ^ (self collect: collectBlock) select: selectBlock!<br>
<br>
Item was added:<br>
+ ----- Method: Stream>>reject:thenDo: (in category 'collections - enumerating') -----<br>
+ reject: rejectBlock thenDo: doBlock <br>
+ <br>
+ ^ (self reject: rejectBlock) do: doBlock!<br>
<br>
Item was added:<br>
+ ----- Method: Stream>>select:thenDo: (in category 'collections - enumerating') -----<br>
+ select: selectBlock thenDo: doBlock <br>
+ <br>
+ ^ (self select: selectBlock) do: doBlock!<br>
<br>
<br>
</div>
</blockquote>
</div>
</div>
</body>
</html>