<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 17, 2017, at 11:47 AM, Michael Ilseman via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">`==` conveys substitutability of the two Sequences. This does not necessarily entail anything about their elements, how those elements are ordered, etc., it just means two Sequences are substitutable. `elementsEqual` means that the two Sequences produce substitutable elements. These are different concepts and both are independently useful.</span></div></blockquote></div><br class=""><div class="">I agree that ‘==‘ conveys substitutability. Here is the issue:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let a = Set([1,2,3,4,5])</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let b = Set([5,4,3,2,1])</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>a == b //True, they are substitutable</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>[1,2,3,4,5].elementsEqual(a) //True</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>[1,2,3,4,5].elementsEqual(b) //False… I guess they weren’t actually substitutable after all</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jon</div></body></html>