<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2014-05-26 21:23 GMT+02:00 Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2014-05-26 21:00 GMT+02:00 Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span>:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br>
On 2014-05-26, at 18:40, Levente Uzonyi &lt;<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>&gt; wrote:<br>
<br>
&gt; On Mon, 26 May 2014, Marcel Taeumel wrote:<br>
&gt;<br>
&gt;&gt; Should this work?<br>
&gt;&gt;<br>
&gt;&gt; OrderedCollection streamContents: [:result |<br>
&gt;&gt;      result nextPutAll: #(a b c) asOrderedCollection].<br>
&gt;&gt;<br>
&gt;&gt; Well, this works:<br>
&gt;&gt;<br>
&gt;&gt; OrderedCollection streamContents: [:result |<br>
&gt;&gt;      result nextPutAll: #(a b c)].<br>
&gt;&gt;<br>
&gt;&gt; And this works, too:<br>
&gt;&gt;<br>
&gt;&gt; OrderedCollection streamContents: [:result |<br>
&gt;&gt;      result nextPut: #foo; nextPutAll: #(a b c) asOrderedCollection].<br>
&gt;<br>
&gt; Even if it would work, it&#39;s a bad pattern, don&#39;t use it. OrderedCollection implements its own streaming API (#add:, #addAll:), which is a lot more efficient. I would use the same API as in streams in my own Smalltalk, but that&#39;s another story.<br>


&gt;<br>
&gt; Also, converting Arrays to OrderedCollections just to throw them away in the next step is just as bad as creating a stream over an OrderedCollection. Don&#39;t do it.<br>
&gt;<br>
&gt;<br>
&gt; Levente<br>
<br>
</div>Still, it should work, don&#39;t you think?<br>
<span><font color="#888888"><br>
- Bert -<br>
<br></font></span></blockquote><div><br></div></div></div><div>It would work if only the implementation of Stream was less bloated.<br></div></div>With current state of code, making it work might have a hard price for low reward IMO.<br>

</div><div class="gmail_extra">But I didn&#39;t look at exact details of the failure, maybe adding one more patch will do it... (until the next bug)<br><br><br></div></div></blockquote><div><br></div><div>I see no simple hack at first glance <br>
</div></div>Note that this (Xtreams) one is working OK:<br><br>(OrderedCollection new: 3) writing write: #(a b c) asOrderedCollection; conclusion.<br><br><br></div></div>