<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">On Apr 5, 2017, 13:21 -0700, Xiaodi Wu &lt;xiaodi.wu@gmail.com&gt;, wrote:<br /></div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div dir="ltr">On Wed, Apr 5, 2017 at 2:22 PM, Jarod Long via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br />
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<div>
<div name="messageBodySection" style="font-size:14px;font-family:-apple-system,blinkmacsystemfont,sans-serif">`integers.all { $0.isEven }` reads like an alias of `filter` to me. The meaning is ambiguous because the missing argument label can be filled in in different ways -- some will read this as "all are even", and others will read it as "all that are even".
<div><br /></div>
<div>I think that ambiguity should be avoided. Something along the lines of `integers.allMatch { $0.isEven }` does just that and reads quite nicely in my opinion.</div>
</div>
</div>
</blockquote>
<div><br /></div>
<div>
<div>There is little to stop someone who might interpret "all are even" to mean "all that are even" also from interpreting "all match" to mean "all that match."</div>
<div><br /></div>
<div>The point of having that gigantic discussion on API guidelines in the past was to obviate these kinds of discussions. Does the proposed `all(equal:)` adhere to those guidelines? If so, then the presumption should be that it achieves the right balance of clarity, concision, readability, etc. If not, we ought to ask what we need to do to get it into compliance with the guidelines, or whether a term-of-art exception is called for.</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br /></div>
<div>I think "all that match" would be a far less reasonable and common interpretation, because if the phrase were to be shortened by removing "that", it would then be phrased as "all matching", not "all match".</div>
<div><br /></div>
<div>I don't want to derail the discussion too much regarding the guidelines, but I'll say that I think it's unrealistic to expect them to eliminate the need to discuss naming. There's a lot of wiggle room within the guidelines, and I think it would be a mistake to hastily accept the first name we think of that doesn't blatantly violate them. We shouldn't spend be spending weeks upon weeks discussing each and every name, but we're well within a reasonable timeframe of discussion for this proposal in my opinion.</div>
<div><br /></div>
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<div>
<div name="messageBodySection" style="font-size:14px;font-family:-apple-system,blinkmacsystemfont,sans-serif">
<div>I also like `integers.containsOnly { $0.isEven }` a lot since it pairs nicely with the existing `contains` method.</div>
</div>
<div name="messageSignatureSection" style="font-size:14px;font-family:-apple-system,blinkmacsystemfont,sans-serif"><br />
Jarod</div>
<div>
<div class="gmail-h5">
<div name="messageReplySection" style="font-size:14px;font-family:-apple-system,blinkmacsystemfont,sans-serif"><br />
On Apr 4, 2017, 02:16 -0700, David Rönnqvist via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">
<div>I agree that&#160;&#160;`all(equal:)` and `all(match:)` are really good names for these methods (I could also consider `every`).</div>
<div><br /></div>
<div>In my understanding of the Swift&#160;API Design Guidelines, it’s good for a number of reasons:</div>
<div><br /></div>
<div>It omits needless words. It’s a sequence of Element, so explicitly mentioning “elements”, “members”, or “items" doesn’t add much.</div>
<div><br /></div>
<div>It strives for fluent usage <i>when used with their argument labels</i>. As&#160;Daniel Duan pointed out, these names roughly read read as:</div>
<div><br /></div>
<div>
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #d35400;">
<div style="word-wrap:break-word">
<div>things all match condition?</div>
<div>things all equal value?</div>
</div>
</blockquote>
</div>
<div><br /></div>
<div>Without the argument label it’s not as clear what it does, but other&#160;functions have a similar problems when used without argument labels. For example,&#160;</div>
<div><br /></div>
<div>xs.prefix { $0 &gt; 5 }</div>
<div>xs.drop { $0 &gt; 5 }</div>
<div>xs.index { $0 &gt; 5 }</div>
<div><br /></div>
<div>It uses terminology well, if `all` is accepted as a term of art. It is at least a common term in other languages for this functionality.&#160;</div>
<div><br /></div>
<div>However, one area where it doesn’t hold as well (ignoring any term of art argument) is that&#160;Boolean methods [...] should read as assertions […] when the use is nonmutating. Here I kind of like the `are` prefix, similar to how `empty` has an `is` prefix (isEmpty). In this case I would also like to see the labels change for a more fluent usage: `areAll(equalTo:)` and `areAll(matching:)`.</div>
<div><br /></div>
<div><br /></div>
<div>
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #d35400;">
<div>On 3 Apr 2017, at 10:29, Daniel Duan via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div>
<br class="gmail-m_5156045403572887232Apple-interchange-newline" />
<div>
<div style="word-wrap:break-word">I want to retract my nitpickings on argument labels; `all(equal:)` and `all(match:)` are the best names for these methods.
<div><br /></div>
<div>things all match condition?</div>
<div>things all equal value?</div>
<div><br /></div>
<div>If we accept `all` as a term of art (which I think we should), along with these labels the use site are very readable!</div>
<div>
<div><br />
<div>
<div>
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #34495e;">
<div>On Mar 31, 2017, at 6:38 PM, Daniel Duan via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div>
<br class="gmail-m_5156045403572887232Apple-interchange-newline" />
<div>
<div style="word-wrap:break-word">nit: should these names be `all(matching)`/`all(equalTo)` per API Design Guidelines?<br />
<div>
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #2ecc71;">
<div>On Mar 31, 2017, at 8:28 AM, Ben Cohen via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div>
<br class="gmail-m_5156045403572887232Apple-interchange-newline" />
<div>
<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:&#160;<a href="https://github.com/airspeedswift/swift-evolution/blob/9a778e904c9be8a3692edd19bb757b23c54aacbe/proposals/0162-all-algorithm.md" target="_blank">https://github.com/<wbr />airspeedswift/swift-evolution/<wbr />blob/<wbr />9a778e904c9be8a3692edd19bb757b<wbr />23c54aacbe/proposals/0162-all-<wbr />algorithm.md</a></div>
<div><br /></div>
<div><br /></div>
<div>
<h1 id="gmail-m_5156045403572887232add-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&#160;<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>&#160;algorithm to&#160;<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:&#160;<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:&#160;<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:&#160;<strong style="box-sizing:border-box">Awaiting review</strong></li>
</ul>
<h2 id="gmail-m_5156045403572887232introduction" 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&#160;<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_5156045403572887232motivation" 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&#160;<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>&#160;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_5156045403572887232swift gmail-m_5156045403572887232hljs" 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_5156045403572887232hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">// every element is 9</span>
!nums.<span class="gmail-m_5156045403572887232hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">contains</span> { $<span class="gmail-m_5156045403572887232hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">0</span> != <span class="gmail-m_5156045403572887232hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">9</span> }
<span class="gmail-m_5156045403572887232hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">// every element is odd</span>
!nums.<span class="gmail-m_5156045403572887232hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">contains</span> { !isOdd($<span class="gmail-m_5156045403572887232hljs-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&#160;<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>&#160;can be used this way, so may hand-roll their own&#160;<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>&#160;loop, which could be buggy<ins id="gmail-m_5156045403572887232firstdiff" 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_5156045403572887232swift gmail-m_5156045403572887232hljs" 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_5156045403572887232hljs-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_5156045403572887232hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">reduce</span>(<span class="gmail-m_5156045403572887232hljs-literal" style="box-sizing:border-box;color:rgb(0,128,128)">true</span>) { $<span class="gmail-m_5156045403572887232hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">0.0</span> &amp;&amp; $<span class="gmail-m_5156045403572887232hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">0.1</span> == <span class="gmail-m_5156045403572887232hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">9</span> }
<span class="gmail-m_5156045403572887232hljs-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_5156045403572887232hljs-type" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Set</span>(nums).<span class="gmail-m_5156045403572887232hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">count</span> == <span class="gmail-m_5156045403572887232hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">1</span> &amp;&amp; <span class="gmail-m_5156045403572887232hljs-type" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Set</span>(nums).first == <span class="gmail-m_5156045403572887232hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">9</span></code>
</pre>
<h2 id="gmail-m_5156045403572887232proposed-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&#160;<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>&#160;which test every element and return&#160;<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>&#160;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_5156045403572887232swift gmail-m_5156045403572887232hljs" 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_5156045403572887232hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">equal</span>: <span class="gmail-m_5156045403572887232hljs-number" style="box-sizing:border-box;color:rgb(0,128,128)">9</span>)
nums.all(match: isOdd)</code>
</pre>
<h2 id="gmail-m_5156045403572887232detailed-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&#160;<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_5156045403572887232swift gmail-m_5156045403572887232hljs" 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_5156045403572887232hljs-class" style="box-sizing:border-box"><span class="gmail-m_5156045403572887232hljs-keyword" style="box-sizing:border-box;font-weight:bold">extension</span> <span class="gmail-m_5156045403572887232hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Sequence</span> </span>{
  <span class="gmail-m_5156045403572887232hljs-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_5156045403572887232hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">/// satisfies the given predicate.</span>
  <span class="gmail-m_5156045403572887232hljs-function" style="box-sizing:border-box"><span class="gmail-m_5156045403572887232hljs-keyword" style="box-sizing:border-box;font-weight:bold">func</span> <span class="gmail-m_5156045403572887232hljs-title" style="box-sizing:border-box;color:rgb(153,0,0);font-weight:bold">all</span><span class="gmail-m_5156045403572887232hljs-params" style="box-sizing:border-box">(match criteria: <span class="gmail-m_5156045403572887232hljs-params" style="box-sizing:border-box">(Iterator.Element)</span></span></span> <span class="gmail-m_5156045403572887232hljs-keyword" style="box-sizing:border-box;font-weight:bold">throws</span> -&gt; <span class="gmail-m_5156045403572887232hljs-type" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Bool</span>) <span class="gmail-m_5156045403572887232hljs-keyword" style="box-sizing:border-box;font-weight:bold">rethrows</span> -&gt; <span class="gmail-m_5156045403572887232hljs-type" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Bool</span>
}

<span class="gmail-m_5156045403572887232hljs-class" style="box-sizing:border-box"><span class="gmail-m_5156045403572887232hljs-keyword" style="box-sizing:border-box;font-weight:bold">extension</span> <span class="gmail-m_5156045403572887232hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Sequence</span> <span class="gmail-m_5156045403572887232hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">where</span> <span class="gmail-m_5156045403572887232hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Iterator</span>.<span class="gmail-m_5156045403572887232hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Element</span>: <span class="gmail-m_5156045403572887232hljs-title" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Equatable</span> </span>{
  <span class="gmail-m_5156045403572887232hljs-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_5156045403572887232hljs-comment" style="box-sizing:border-box;color:rgb(153,153,136);font-style:italic">/// equals the given element.</span>
  <span class="gmail-m_5156045403572887232hljs-function" style="box-sizing:border-box"><span class="gmail-m_5156045403572887232hljs-keyword" style="box-sizing:border-box;font-weight:bold">func</span> <span class="gmail-m_5156045403572887232hljs-title" style="box-sizing:border-box;color:rgb(153,0,0);font-weight:bold">all</span><span class="gmail-m_5156045403572887232hljs-params" style="box-sizing:border-box">(<span class="gmail-m_5156045403572887232hljs-built_in" style="box-sizing:border-box;color:rgb(0,134,179)">equal</span> element: Iterator.Element)</span></span> -&gt; <span class="gmail-m_5156045403572887232hljs-type" style="box-sizing:border-box;color:rgb(68,85,136);font-weight:bold">Bool</span>
}</code>
</pre>
<h2 id="gmail-m_5156045403572887232source-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_5156045403572887232effect-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_5156045403572887232effect-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_5156045403572887232alternatives-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>
______________________________<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" target="_blank">https://lists.swift.org/<wbr />mailman/listinfo/swift-<wbr />evolution</a><br /></div>
</blockquote>
</div>
<br /></div>
______________________________<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" target="_blank">https://lists.swift.org/<wbr />mailman/listinfo/swift-<wbr />evolution</a><br /></div>
</blockquote>
</div>
<br /></div>
</div>
</div>
</div>
______________________________<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" target="_blank">https://lists.swift.org/<wbr />mailman/listinfo/swift-<wbr />evolution</a><br /></div>
</blockquote>
</div>
<br />
______________________________<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" target="_blank">https://lists.swift.org/<wbr />mailman/listinfo/swift-<wbr />evolution</a><br /></blockquote>
</div>
</div>
</div>
</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>
</blockquote>
</div>
</body>
</html>