<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Hmm... one could implement a gather-version of #fillFrom:with: and use that in #gather:as:? :-)<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;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 15.08.2019 16:36:04 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<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>Just one another idea, could we maybe introduce #gather:as:, analogous to #collect:as:?</p>
<p><br>
</p>
<p></p>
<div>gather: aBlock as: aClass</div>
<div><br>
</div>
<div><span style="white-space:pre"></span>^ (aClass inheritsFrom: SequenceableCollection)</div>
<div><span style="white-space:pre"></span>ifTrue: [aClass streamContents: [:stream |</div>
<div><span style="white-space:pre"></span>self do: [:ea | stream nextPutAll: (aBlock value: ea)]]]</div>
<div><span style="white-space:pre"></span>ifFalse: [(self gather: aBlock as: Array) as: aClass]</div>
<br>
<p></p>
<p>Best,</p>
<p>Christoph</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif;color: #000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Thiede, Christoph<br>
<b>Gesendet:</b> Donnerstag, 15. August 2019 02:20:55<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Collections-ct.850.mcz</span>
<div> </div>
</div>
<div><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>Thank you for the hint! I was not aware of #gather:, so #collectAll: does not really add value. :)</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif;color: #000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Jakob Reschke <forums.jakob@resfarm.de><br>
<b>Gesendet:</b> Donnerstag, 15. August 2019 02:07:07<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Collections-ct.850.mcz</span>
<div> </div>
</div>
<div>
<div dir="ltr">I don't see why the elements of the receiver must be collections. The result of the block must be a collection. Do the results differ between the following two expressions?
<div><br>
</div>
<div>    aCollection collectAll: [:each | ...].</div>
<div>    (aCollection gather: [:each | ...]) asSet.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am Do., 15. Aug. 2019 um 00:57 Uhr schrieb <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
A new version of Collections was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Collections-ct.850.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Collections-ct.850.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Collections-ct.850<br>
Author: ct<br>
Time: 15 August 2019, 12:57:02.047584 am<br>
UUID: a8581084-5210-3747-8b96-791b0458f52f<br>
Ancestors: Collections-fn.847<br>
<br>
Add #collectAll:, which performs a collector on each simply nested element<br>
<br>
=============== Diff against Collections-fn.847 ===============<br>
<br>
Item was added:<br>
+ ----- Method: Collection>>collectAll: (in category 'enumerating') -----<br>
+ collectAll: aBlock<br>
+       "Loop over all elements of the receiver which must be collections<br>
+       and for each simply nested element, evaluate aBlock. Collect the<br>
+       resulting values into a set. Return the set."<br>
+ <br>
+       | result |<br>
+       result := Set new.<br>
+       self<br>
+               collect: aBlock<br>
+               thenDo: [:collection | result addAll: collection].<br>
+       ^ result!<br>
<br>
<br>
</blockquote>
</div>
</div>
</div>
</div></blockquote>
                                        </div></body>