<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 31, 2017 at 12:14 PM, Joshua Alvarado via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Nice addition! </div><div><br></div><div>What do you think of equal parameter named to are?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="color:rgb(51,51,51);font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;background-color:rgb(248,248,248)">nums.all(</span><span class="gmail-m_5546541754860723857gmail-m_7135649615012295691hljs-built_in" style="font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;box-sizing:border-box;color:rgb(0,134,179)">equal</span><span style="color:rgb(51,51,51);font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;background-color:rgb(248,248,248)">: </span><span class="gmail-m_5546541754860723857gmail-m_7135649615012295691hljs-number" style="font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;box-sizing:border-box;color:rgb(0,128,128)">9</span><span class="gmail-m_5546541754860723857gmail-m_7135649615012295691hljs-number" style="font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;box-sizing:border-box;background-color:rgb(248,248,248)"><font color="#333333">)</font></span> </blockquote><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="color:rgb(51,51,51);font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;background-color:rgb(248,248,248)">nums.all(</span><span class="gmail-m_5546541754860723857gmail-m_7135649615012295691hljs-built_in" style="font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;box-sizing:border-box;color:rgb(0,134,179)">are</span><span style="color:rgb(51,51,51);font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;background-color:rgb(248,248,248)">: </span><span class="gmail-m_5546541754860723857gmail-m_7135649615012295691hljs-number" style="font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;box-sizing:border-box;color:rgb(0,128,128)">9</span><span style="color:rgb(51,51,51);font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;background-color:rgb(248,248,248)">)</span></blockquote></div><div><br></div><div>I think it reads better and adds an explicit action of what is being checked.</div><div> </div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">if <span style="color:rgb(51,51,51);font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;background-color:rgb(248,248,248)">nums.all(</span><span class="gmail-m_5546541754860723857gmail-m_7135649615012295691hljs-built_in" style="font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;box-sizing:border-box;color:rgb(0,134,179)">are</span><span style="color:rgb(51,51,51);font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;background-color:rgb(248,248,248)">: </span><span class="gmail-m_5546541754860723857gmail-m_7135649615012295691hljs-number" style="font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;box-sizing:border-box;color:rgb(0,128,128)">9</span><span style="color:rgb(51,51,51);font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;white-space:pre-wrap;background-color:rgb(248,248,248)">) { print("all elements are 9") }</span> </blockquote></div></div></blockquote><div><br></div><div>By the same token, `all(match:)` could be renamed `all(are:)`, and therein lies the problem.</div><div>I like `equal`. It explains what operation is being performed to determine if two things "are" the same and distinguishes the function from `match`.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><div><div class="gmail-h5">On Fri, Mar 31, 2017 at 9:28 AM, Ben Cohen via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><div style="word-wrap:break-word;line-break:after-white-space">Hi,<div><br></div><div>A short proposal for you as part of the algorithms theme. Hopefully non-controversial, aside from the naming of the method and arguments, about which controversy abounds. Online copy here: <a href="https://github.com/airspeedswift/swift-evolution/blob/9a778e904c9be8a3692edd19bb757b23c54aacbe/proposals/0162-all-algorithm.md" target="_blank">https://github.com/airsp<wbr>eedswift/swift-evolution/blob/<wbr>9a778e904c9be8a3692edd19bb757b<wbr>23c54aacbe/proposals/0162-all-<wbr>algorithm.md</a></div><div><br></div><div><br></div><div><h1 id="gmail-m_5546541754860723857m_7135649615012295691add-an--code-all--code--algorithm-to--code-sequence--code-" style="box-sizing:border-box;font-size:2.25em;margin:0px 0px 16px;line-height:1.2;color:rgb(51,51,51);padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-family:helvetica,arial,freesans,clean,sans-serif;background-color:rgb(255,255,255)">Add an <code style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:24.479999542236328px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">all</code> algorithm to <code style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:24.479999542236328px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Sequence</code></h1><ul style="box-sizing:border-box;padding:0px 0px 0px 2em;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:helvetica,arial,freesans,clean,sans-serif;font-size:12.799999237060547px;background-color:rgb(255,255,255)"><li style="box-sizing:border-box">Proposal: <a style="box-sizing:border-box;background-color:transparent;color:rgb(65,131,196);text-decoration:none">SE-NNNN</a></li><li style="box-sizing:border-box">Authors: <a href="https://github.com/airspeedswift" style="box-sizing:border-box;background-color:transparent;color:rgb(65,131,196);text-decoration:none" target="_blank">Ben Cohen</a></li><li style="box-sizing:border-box">Review Manager: TBD</li><li style="box-sizing:border-box">Status: <strong style="box-sizing:border-box">Awaiting review</strong></li></ul><h2 id="gmail-m_5546541754860723857m_7135649615012295691introduction" style="box-sizing:border-box;margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;color:rgb(51,51,51);padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-family:helvetica,arial,freesans,clean,sans-serif;background-color:rgb(255,255,255)">Introduction</h2><p style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:helvetica,arial,freesans,clean,sans-serif;font-size:12.799999237060547px;background-color:rgb(255,255,255)">It is common to want to confirm that every element of a sequence equals a value, or matches a certain criteria. Many implementations of this can be found in use on github. This proposal adds such a method to <code style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Sequence</code>.</p><h2 id="gmail-m_5546541754860723857m_7135649615012295691motivation" style="box-sizing:border-box;margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;color:rgb(51,51,51);padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-family:helvetica,arial,freesans,clean,sans-serif;background-color:rgb(255,255,255)">Motivation</h2><p style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:helvetica,arial,freesans,clean,sans-serif;font-size:12.799999237060547px;background-color:rgb(255,255,255)">You can achieve this in Swift 3 with <code style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">contains</code> by negating both the criteria and the result:</p><pre style="box-sizing:border-box;overflow:auto;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51);height:103px"><code class="gmail-m_5546541754860723857m_7135649615012295691swift gmail-m_5546541754860723857m_7135649615012295691hljs" style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;padding:0.5em;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:0px;display:block;overflow-x:auto;line-height:inherit;word-wrap:normal;height:auto"><span class="gmail-m_5546541754860723857m_7135649615012295691hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">// every element is 9</span>
!nums.<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">contains</span> { $<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">0</span> != <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">9</span> }
<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">// every element is odd</span>
!nums.<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">contains</span> { !isOdd($<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">0</span>) }</code></pre><p style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:helvetica,arial,freesans,clean,sans-serif;font-size:12.799999237060547px;background-color:rgb(255,255,255)">but these are a readability nightmare. Additionally, developers may not make the leap to realize <code style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">contains</code> can be used this way, so may hand-roll their own <code style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">for</code> loop, which could be buggy<ins id="gmail-m_5546541754860723857m_7135649615012295691firstdiff" style="box-sizing:border-box;display:inline-block;text-decoration:none;border:none;background-image:none"></ins>, or compose other inefficient alternatives:</p><pre style="box-sizing:border-box;overflow:auto;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51);height:103px"><code class="gmail-m_5546541754860723857m_7135649615012295691swift gmail-m_5546541754860723857m_7135649615012295691hljs" style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;padding:0.5em;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:0px;display:block;overflow-x:auto;line-height:inherit;word-wrap:normal;height:auto"><span class="gmail-m_5546541754860723857m_7135649615012295691hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">// misses opportunity to bail early</span>
nums.<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">reduce</span>(<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-literal" style="box-sizing:border-box;color:rgb(0,128,128)">true</span>) { $<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">0.0</span> && $<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">0.1</span> == <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">9</span> }
<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">// the most straw-man travesty I could think of...</span>
<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-type" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Set</span>(nums).<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">count</span> == <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">1</span> && <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-type" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Set</span>(nums).first == <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">9</span></code></pre><h2 id="gmail-m_5546541754860723857m_7135649615012295691proposed-solution" style="box-sizing:border-box;margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;color:rgb(51,51,51);padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-family:helvetica,arial,freesans,clean,sans-serif;background-color:rgb(255,255,255)">Proposed solution</h2><p style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:helvetica,arial,freesans,clean,sans-serif;font-size:12.799999237060547px;background-color:rgb(255,255,255)">Introduce two algorithms on <code style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Sequence</code> which test every element and return <code style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">true</code> if they match:</p><pre style="box-sizing:border-box;overflow:auto;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51);height:73px"><code class="gmail-m_5546541754860723857m_7135649615012295691swift gmail-m_5546541754860723857m_7135649615012295691hljs" style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;padding:0.5em;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:0px;display:block;overflow-x:auto;line-height:inherit;word-wrap:normal;height:auto">nums.all(<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">equal</span>: <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">9</span>)
nums.all(match: isOdd)</code></pre><h2 id="gmail-m_5546541754860723857m_7135649615012295691detailed-design" style="box-sizing:border-box;margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;color:rgb(51,51,51);padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-family:helvetica,arial,freesans,clean,sans-serif;background-color:rgb(255,255,255)">Detailed design</h2><p style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:helvetica,arial,freesans,clean,sans-serif;font-size:12.799999237060547px;background-color:rgb(255,255,255)">Add the following extensions to <code style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Sequence</code>:</p><pre style="box-sizing:border-box;overflow:auto;font-family:consolas,'liberation mono',menlo,courier,monospace;font-size:10.880000114440918px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51);height:208px"><code class="gmail-m_5546541754860723857m_7135649615012295691swift gmail-m_5546541754860723857m_7135649615012295691hljs" style="box-sizing:border-box;font-family:consolas,'liberation mono',menlo,courier,monospace;padding:0.5em;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:0px;display:block;overflow-x:auto;line-height:inherit;word-wrap:normal;height:auto"><span class="gmail-m_5546541754860723857m_7135649615012295691hljs-class" style="box-sizing:border-box"><span class="gmail-m_5546541754860723857m_7135649615012295691hljs-keyword" style="box-sizing:border-box;font-weight:bold">extension</span> <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Sequence</span> </span>{
<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">/// Returns a Boolean value indicating whether every element of the sequence</span>
<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">/// satisfies the given predicate.</span>
<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-function" style="box-sizing:border-box"><span class="gmail-m_5546541754860723857m_7135649615012295691hljs-keyword" style="box-sizing:border-box;font-weight:bold">func</span> <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-title" style="box-sizing:border-box;color:rgb(153,0,0);font-weight:bold">all</span><span class="gmail-m_5546541754860723857m_7135649615012295691hljs-params" style="box-sizing:border-box">(match criteria: <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-params" style="box-sizing:border-box">(Iterator.Element)</span></span></span> <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-keyword" style="box-sizing:border-box;font-weight:bold">throws</span> -> <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-type" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Bool</span>) <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-keyword" style="box-sizing:border-box;font-weight:bold">rethrows</span> -> <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-type" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Bool</span>
}
<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-class" style="box-sizing:border-box"><span class="gmail-m_5546541754860723857m_7135649615012295691hljs-keyword" style="box-sizing:border-box;font-weight:bold">extension</span> <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Sequence</span> <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">where</span> <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Iterator</span>.<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Element</span>: <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Equatable</span> </span>{
<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">/// Returns a Boolean value indicating whether every element of the sequence</span>
<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">/// equals the given element.</span>
<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-function" style="box-sizing:border-box"><span class="gmail-m_5546541754860723857m_7135649615012295691hljs-keyword" style="box-sizing:border-box;font-weight:bold">func</span> <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-title" style="box-sizing:border-box;color:rgb(153,0,0);font-weight:bold">all</span><span class="gmail-m_5546541754860723857m_7135649615012295691hljs-params" style="box-sizing:border-box">(<span class="gmail-m_5546541754860723857m_7135649615012295691hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">equal</span> element: Iterator.Element)</span></span> -> <span class="gmail-m_5546541754860723857m_7135649615012295691hljs-type" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Bool</span>
}</code></pre><h2 id="gmail-m_5546541754860723857m_7135649615012295691source-compatibility" style="box-sizing:border-box;margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;color:rgb(51,51,51);padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-family:helvetica,arial,freesans,clean,sans-serif;background-color:rgb(255,255,255)">Source compatibility</h2><p style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:helvetica,arial,freesans,clean,sans-serif;font-size:12.799999237060547px;background-color:rgb(255,255,255)">This change is purely additive so has no source compatibility consequences.</p><h2 id="gmail-m_5546541754860723857m_7135649615012295691effect-on-abi-stability" style="box-sizing:border-box;margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;color:rgb(51,51,51);padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-family:helvetica,arial,freesans,clean,sans-serif;background-color:rgb(255,255,255)">Effect on ABI stability</h2><p style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:helvetica,arial,freesans,clean,sans-serif;font-size:12.799999237060547px;background-color:rgb(255,255,255)">This change is purely additive so has no ABI stability consequences.</p><h2 id="gmail-m_5546541754860723857m_7135649615012295691effect-on-api-resilience" style="box-sizing:border-box;margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;color:rgb(51,51,51);padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-family:helvetica,arial,freesans,clean,sans-serif;background-color:rgb(255,255,255)">Effect on API resilience</h2><p style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:helvetica,arial,freesans,clean,sans-serif;font-size:12.799999237060547px;background-color:rgb(255,255,255)">This change is purely additive so has no API resilience consequences.</p><h2 id="gmail-m_5546541754860723857m_7135649615012295691alternatives-considered" style="box-sizing:border-box;margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;color:rgb(51,51,51);padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-family:helvetica,arial,freesans,clean,sans-serif;background-color:rgb(255,255,255)">Alternatives considered</h2><div style="box-sizing:border-box;margin:0px;color:rgb(51,51,51);font-family:helvetica,arial,freesans,clean,sans-serif;font-size:12.799999237060547px;background-color:rgb(255,255,255)">Not adding it.</div></div></div><br></div></div><span class="gmail-">______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-evolution</a><br>
<br></span></blockquote></div><span class="gmail-HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_5546541754860723857gmail_signature">Joshua Alvarado<div><a href="mailto:alvaradojoshua0@gmail.com" target="_blank">alvaradojoshua0@gmail.com</a></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br></blockquote></div><br></div></div>