<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <br>
    Hi, <br>
    <br>
    The "set" is a mathematical object which is defined by what it
    contains, there isn't any order concept in it.<br>
    <br>
    So, by definition of set: {1,2,3} = {2,3,1}<br>
    <br>
    It makes not even sense to ask what is the first element of a set,
    because there is no order in it. <br>
    <br>
    So, I guess Christoph is giving you the right hint, keep working
    with OrderedCollection.<br>
    <br>
    Then, you may open your Squeak, on top of the Window select Help
    -> Terse Guide To Squeak <br>
    and check ouy "Bag" and "Set" sections.<br>
    <br>
    bye<br>
    n.<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 2/11/20 7:11 AM, Thiede, Christoph
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:7b107eea457b4c64ae59d6afd717cf4b@student.hpi.uni-potsdam.de">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Exchange Server">
      <!-- converted from text -->
      <style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
      <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"
                                          moz-do-not-send="true"><font
                                            size="2"><span
                                              id="LPlnk909538"></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>
            </div>
          </div>
        </div>
        <hr tabindex="-1" style="display:inline-block; width:98%">
        <div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
            face="Calibri, sans-serif" color="#000000"><b>Von:</b>
            Beginners
            <a class="moz-txt-link-rfc2396E" href="mailto:beginners-bounces@lists.squeakfoundation.org"><beginners-bounces@lists.squeakfoundation.org></a> im
            Auftrag von tty <a class="moz-txt-link-rfc2396E" href="mailto:gettimothy@zoho.com"><gettimothy@zoho.com></a><br>
            <b>Gesendet:</b> Dienstag, 11. Februar 2020 16:07:15<br>
            <b>An:</b> <a class="moz-txt-link-abbreviated" href="mailto:beginners@lists.squeakfoundation.org">beginners@lists.squeakfoundation.org</a><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"
              moz-do-not-send="true">http://forum.world.st/Squeak-Beginners-f107673.html</a><br>
            _______________________________________________<br>
            Beginners mailing list<br>
            <a class="moz-txt-link-abbreviated" href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
            <a
              href="http://lists.squeakfoundation.org/mailman/listinfo/beginners"
              moz-do-not-send="true">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
          </div>
        </span></font>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Beginners mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>