<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>Hi tty,</p>
<p><br>
</p>
<p>Set does not guarantee the order of elements. It's an implementation detail. If you only need to remove duplicates, have a look at #withoutDuplicates.</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">Does this help? :-)</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> Beginners <beginners-bounces@lists.squeakfoundation.org> im Auftrag von tty <gettimothy@zoho.com><br>
<b>Gesendet:</b> Dienstag, 11. Februar 2020 16:07:15<br>
<b>An:</b> beginners@lists.squeakfoundation.org<br>
<b>Betreff:</b> [Newbies] Does Set respect ordering?</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Folks.<br>
<br>
<br>
If I have an OrderedCollection and convert it to Set via asSet, am I<br>
guaranteed that the resulting Set contains elements in the same order as the<br>
OrderedCollection?<br>
<br>
Here is my problem. <br>
<br>
I have an OrderedCollection with the same element in it twice. By same<br>
element, I mean they are the same object.<br>
<br>
*an OrderedCollection(<br>
A<br>
NESTED  TABLE CELL<br>
 <br>
B <br>
A<br>
NESTED  TABLE CELL<br>
<br>
)<br>
*<br>
<br>
Above, the first and third elements are the same XMLElement. I now this<br>
because if I inspect them and then change one, the other changes.<br>
<br>
if I run asSet on the OrderedCollection, I get what I need:<br>
<br>
*a Set( A<br>
NESTED  TABLE CELL<br>
 <br>
B)*<br>
<br>
<br>
In that conversion, can I rely on that Ordering being preserved?<br>
<br>
If not, a pointer to the correct select/reject/inject/detect...sort of thing<br>
would be much appreciated.<br>
<br>
cheers.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://forum.world.st/Squeak-Beginners-f107673.html">http://forum.world.st/Squeak-Beginners-f107673.html</a><br>
_______________________________________________<br>
Beginners mailing list<br>
Beginners@lists.squeakfoundation.org<br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div>
</span></font>
</body>
</html>