<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=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class=""><div dir="ltr" style="text-align: start; text-indent: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><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 style="word-wrap: break-word;" class=""><div class=""><span class="gmail-"><blockquote type="cite" class=""><div class=""><div class="gmail_quote" style="text-align: start; text-indent: 0px;"><div class=""><font color="#000000" class="">[…]</font></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">* A Swift `Sequence` is, to put it simplistically, a thing that can be iterated over in a `for...in` loop. If it would make you happy, for the rest of the discussion, let's suppose we called the protocol `ForLoopable` instead of `Sequence`.</div></div></div></blockquote><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div></span><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">ForLoopable is so ugly. Since we’re just iterating over the elements, how about, oh, say, `Iterable`? Hey, that looks familiar.</div></div></div></blockquote><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I'm not trying to bikeshed the name of `Sequence`. I'm picking an intentionally unwieldy name for the purposes of discussing the semantics of this particular protocol. The point is that the underlying issue has nothing to do with the name; it can be `Iterable` or it can be `SpongeBob` for all I care.</div></div></div></div></div></blockquote><div><br class=""></div><div>I’m not trying to bikeshed the name either, The underlying issue is that (what is currently) Sequence actually encompasses two separate functionalities, and those functionalities need to be separated with their separate semantic requirements documented. “Sequence: Iterable,” “OrderedSequence: Sequence,” “SpongeBob: ForLoopable,” the names are 100% irrelevant at this point; what’s important is that one is not necessarily ordered and the other guarantees an order.</div><div>&nbsp;</div><blockquote type="cite" class=""><div dir="ltr" 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;" class=""><div class="gmail_extra"><div class="gmail_quote"><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 style="word-wrap: break-word;" class=""><div class=""><span class="gmail-"><blockquote type="cite" class=""><div class=""><div class="gmail_quote" 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;"><div class="">[…]</div></div></div></blockquote></span></div><div class=""><span class="gmail-"><blockquote type="cite" class=""><div class=""><div class="gmail_quote" 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;"><div class="">* If a type `T` conforms to `ForLoopable` and an instance `t` of that type has at least one element, then *something* has to be the first element in a `for element in t { ... }` loop. Put another way, every instance of a type that conforms to `ForLoopable` must have at least one publicly observable order (although, intriguingly, I'm not sure it has to be a repeatable one). It is possible, therefore, to have a semantic answer to the question of which element is `first` or (if finite) `last`; one can also `drop(while:)`, etc., and perform lexicographical comparisons.</div></div></div></blockquote><div class=""><br class=""></div></span>As a side effect of Swift being a procedural language each iteration happens to occur in some order, yes, but that order is meaningless and reflects nothing about the Set itself.&nbsp; In fact, I’d say that&nbsp;<b class="">`first`, `last`, etc. are not even defined on the original Set per se, only on the specific order that a particular iteration resulted in</b>. And that order is not necessarily predictable, nor necessarily stable, as you yourself said.</div><div class=""><br class=""></div><div class="">Consider an Iterable that gives a different order every time it’s iterated.&nbsp;</div><div class="">Should calling `.first` or `last` give a different object every time?&nbsp; That’s absurd.</div><div class="">Should an object lexicographically compare not equal to itself? Even more absurd.&nbsp;</div></div></blockquote><div class=""><br class=""></div><div class="">What's your basis for saying that such behavior is absurd? It is explicitly permitted for instances of types conforming to `SpongeBob` to be single-pass and/or infinite. For a single-pass `SpongeBob`, `first` will certainly return a different value every time it is invoked.</div></div></div></div></blockquote><div><br class=""></div>Is `first` mutating? No. Should it be? No! `first` and `last` are a peek at the state of the object.</div><div>Is `elementsEqual` (or *shudder* lexicographicallyEqual) reflexive? IMO it clearly should be. Especially with the “lexicographically” part—from everything I can find, a lexicographical ordering is by definition reflexive. Do you have a citation for the idea that lexicographical equality can legitimately be non-reflexive?<br class=""><br class=""><blockquote type="cite" class=""><div dir="ltr" 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;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">A random number generator fulfills all the semantic requirements of conforming to `SpongeBob`, and in fact<span class="Apple-converted-space">&nbsp;</span><a href="https://github.com/xwu/NumericAnnex/blob/master/Sources/PRNG.swift#L53" class="">I do just that in NumericAnnex</a>. `first` gives a different value every time, and a randomly generated `SpongeBob` would unsurprisingly compare lexicographically not equal to itself.</div></div></div></div></blockquote><div><br class=""></div><div>IMO that’s a bug in the implementation; lexicographical equality is reflexive, period.</div><div><br class=""></div><div>Presumably the `elementsEqual` method contains something along these lines (take from SequenceAlgorithms.swift.gyb):</div><div><br class=""></div><div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(192, 192, 192); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp;&nbsp;</span><span style="font-variant-ligatures: no-common-ligatures; color: #d53bd3" class="">var</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc8" class="">iter1</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc8" class="">=</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc8" class="">self</span><span style="font-variant-ligatures: no-common-ligatures" class="">.makeIterator()</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(192, 192, 192); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #d53bd3" class="">var</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc8" class="">iter2</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc8" class="">=</span><span style="font-variant-ligatures: no-common-ligatures" class=""> other.makeIterator()</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></div><div>By creating two iterators, you’re mutating while iterating. Turns out there’s even a warning against this in Sequence.swift:</div><div><br class=""></div><div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// Using Multiple Iterators</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// ========================</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">///</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// Whenever you use multiple iterators (or `for`-`in` loops) over a single</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// sequence, be sure you know that the specific sequence supports repeated</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// iteration, either because you know its concrete type or because the</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// sequence is also constrained to the `Collection` protocol.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">///</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// Obtain each separate iterator from separate calls to the sequence's</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// `makeIterator()` method rather than by copying. Copying an iterator is</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// safe, but advancing one copy of an iterator by calling its `next()` method</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// may invalidate other copies of that iterator. `for`-`in` loops are safe in</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(92, 124, 245); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// this regard.</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></div><div><b class="">The default implementation of elementsEqual is therefore unsafe</b> because it has the potential for using an invalidated iterator.</div><br class=""><blockquote type="cite" class=""><div dir="ltr" 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;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></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 style="word-wrap: break-word;" class=""><div class=""></div><div class="">On the other hand, if I have a collection of objects that I want iterated in a particular order, I can use a container that iterates in a specific, known, well-defined way, and use that to construct the sequence of objects.&nbsp; That’s clearly an Iterable collection, but the guarantee is stronger than that. Since it iterates objects in a specific sequence, the logical way to express that would be `Sequence: Iterable`. Again, we’ve seen that before. &nbsp;</div><div class=""><br class=""></div><div class="">Now, since a Sequence is guaranteed to iterate the same every time, suddenly our `first`, `last`, `drop*`, etc. methods have a meaning inherent to the collection itself, rather than a specific iteration.</div></div></blockquote><div class=""><br class=""></div><div class="">What you call a "Sequence" here would have to be multi-pass, finite, and ordered. </div></div></div></div></blockquote><div><br class=""></div>Ordered, yes, but it’s only admittedly poor wording that suggests multi-pass, and I don’t think anything there suggests finite.</div><div><br class=""></div><div>It would be better to say that the iteration order is well-defined. That will almost always mean documented, and usually predictable though obviously e.g. RNGs and iterating in random order will not be predictable by design.</div><div><br class=""><blockquote type="cite" class=""><div dir="ltr" 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;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">That's actually more semantically constrained than what Swift calls a `Collection` (which requires conforming types to be multi-pass and(?) finite). By contrast, Swift's `SpongeBob` protocol explicitly permits conforming single-pass, infinite, and/or unordered types. </div></div></div></div></blockquote><div><br class=""></div>I think you’re talking about Sequence here, I’ve lost track of your nonsense by now. Yes, the current Swift protocol named Sequence allows unordered types. You seem to keep asserting that but not actually addressing my argument, which is&nbsp;<b class="">that allowing Sequences to be unordered with the current API is undesired and actively harmful, and should</b>&nbsp;<b class="">therefore</b><b class="">&nbsp;be changed</b>.</div><div><br class=""><blockquote type="cite" class=""><div dir="ltr" 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;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">As long as it is possible to iterate over a `SpongeBob`, it is meaningful to ask what element is first obtained upon iteration or to drop the first element obtained upon iteration.</div></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div dir="ltr" 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;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">And as long as iteration is not required to be repeatable (and it isn't), it is perfectly acceptable for these algorithms to return a different result every time.</div></div></div></div></div></blockquote><div><br class=""></div><div>It is “meaningful” in the sense that it can technically be programmed. The actual results are meaningless beyond returning or dropping a random* element.</div><div><br class=""></div><div><div>*: Don’t nitpick the word “random”, you know exactly what I mean. It’s just shorter and no less clear than “technically more-or-less deterministic but not documented, not generally predictable, and probably but not necessarily consistent from one call to the next."</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"></div></div></div></blockquote></div><blockquote type="cite" class=""><div class=""><div dir="ltr" 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;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></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 style="word-wrap: break-word;" class=""><div class="">`first` is the first object in the Sequence. It doesn’t matter how the sequence came to be in that order; it doesn’t matter whether or not the sequence has already been iterated or how many times. `first` is the first object that is, was, and always will be presented by the Sequence’s Iterator. (Until the collection is mutated, obviously).</div><div class=""><br class=""></div><div style="font-size: 13px;" class=""><b class="">To summarize,</b></div><div class="">A Set has no intrinsic order. You can iterate over it, and a specific iteration of a set has an order, but that order is not tied to the Set itself beyond including all and only the items therein. Therefore, the Set itself has no intrinsic `first`, `last`, lexicographical comparison, etc.; only its iterations do, and they are not themselves Sets.</div><div class="">A Sequence does have an intrinsic order. The order of iteration reflects the order inherent to the Sequence. Therefore, a Sequence has a `first`, `last`, lexicographical comparison, etc.</div><div class=""><br class=""></div><div class="">Just in case it’s not obvious, `Set` here is pretty much interchangeable with any other unordered iterable.</div></div></blockquote><div class=""><br class=""></div><div class="">What you want to call a "Sequence" is what Swift calls a `Collection`, with additional restrictions. What you want to be called "Iterable" is what Swift calls `Sequence` (or now, `SpongeBob`). Clearly, shuffling names will not make these protocols support any more functionality, so that can be put aside.</div></div></div></div></div></blockquote><div><br class=""></div><div>No, no, no! What I want to call “Iterable” is specified below. It is about HALF of what’s currently in Sequence—the half that has to do with iterating, whence the name.</div><div>What I want to call Sequence is precisely what Swift now calls Sequence—the methods that are in Iterable by virtue of adopting Iterable, PLUS some methods that only make sense on iterable groups of objects where the iteration order is well-defined.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" 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;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">Now, with that out of the way, why do you think that only `Collection` types should have `first` and `last`? These helper properties and methods are simply convenient ways to spell things that can be done with `for...in`--the whole point of supplying them is to allow people to work with these types in a more functional style.</div></div></div></div></div></blockquote><div><br class=""></div><div>Apparently “collection" was a bad choice of word. What I clearly meant was not the current Swift Collection protocol, but rather an unordered assemblage of objects. UnorderedCollection, perhaps, or if that’s still going to cause issues, try UnorderedAssemblage. &nbsp;What `first` and `last` really mean in an UnorderedAssemblage is give me some object from the assembled objects, I don’t care which one. For which it’s much more clear to have an `anyObject()` as on NSSet; as another user has pointed out, `assemblage.makeIterator().next()` works just as well. (I just checked, and that’s actually how `first` is implemented. But it’s on Collection, which is guaranteed to be multipass,)</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" 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;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></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 style="word-wrap: break-word;" class=""><span class="gmail-"><div class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote" 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;"><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 style="word-wrap: break-word;" class=""><div dir="auto" style="word-wrap: break-word;" class=""><div dir="auto" style="word-wrap: break-word;" class=""><div class=""><div class=""><div class="gmail-m_2877875185135332990h5"><blockquote type="cite" class=""><div class=""><div class=""><div class=""><div class="gmail_quote"><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"><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 style="word-wrap: break-word;" class=""><div class=""><div class=""><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(233, 175, 205); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">public</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">protocol</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">Iterable</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>{</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(52, 188, 38); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(205, 121, 35);" class="">associatedtype</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>Iterator</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">:</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">Ite<wbr class="">ratorProtocol</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(130, 185, 255); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">map</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">&lt;</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">T</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">&gt;</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">...</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">)<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">-&gt;</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">T</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">]</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">// Iterable where .Iterator.Element == T</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(130, 185, 255); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">filter</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">...</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">)<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">-&gt;</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">Iterato<wbr class="">r.Element</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">]</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">// Iterable where .Iterator.Element == Self.Iterator.Element</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(52, 187, 200); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">forEach</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">(</span><span style="font-variant-ligatures: no-common-ligatures;" class="">...</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(52, 187, 200); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">makeIterator</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">()<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">-&gt;</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">Itera<wbr class="">tor</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(52, 187, 200); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">var</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">underestimatedCount</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">:</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">Int</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space"><wbr class="">&nbsp;</span>{<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(205, 121, 35);" class="">get</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>}</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(214, 214, 214); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">}</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(214, 214, 214); background-color: rgba(0, 0, 0, 0.901961); min-height: 14px;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(130, 185, 255); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">public</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">protocol</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">Sequence</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">:</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">Iter<wbr class="">able</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>{<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">// Maybe OrderedSequence just to make the well-defined-order requirement explicit</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(214, 214, 214); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(205, 121, 35);" class="">associatedtype</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>SubSequence</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(130, 185, 255); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">dropFirst</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">...</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">) &nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">-&gt;</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">SubSequence</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">// Sequence where .Iterator.Element == Self.Iterator.Element</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(214, 214, 214); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">dropLast</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">...</span><span style="font-variant-ligatures: no-common-ligatures;" class="">)&nbsp; &nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">-&gt;</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">SubSequence</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(130, 185, 255);" class="">//&nbsp; &nbsp; " "</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(214, 214, 214); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">drop</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(205, 121, 35);" class="">while</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">...</span><span style="font-variant-ligatures: no-common-ligatures;" class="">) &nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">-&gt;</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">SubSequence</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(130, 185, 255);" class="">//&nbsp; &nbsp; " "</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(214, 214, 214); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">prefix</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">...</span><span style="font-variant-ligatures: no-common-ligatures;" class="">)&nbsp; &nbsp; &nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">-&gt;</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">SubSequence</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(130, 185, 255);" class="">//&nbsp; &nbsp; " "</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(52, 188, 38); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">prefix</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(205, 121, 35);" class="">while</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">...</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">)<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">-&gt;</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">Sub<wbr class="">Sequence</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(130, 185, 255);" class="">//&nbsp; &nbsp; " "</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(214, 214, 214); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">suffix</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">...</span><span style="font-variant-ligatures: no-common-ligatures;" class="">)&nbsp; &nbsp; &nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">-&gt;</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">SubSequence</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span>&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(130, 185, 255);" class="">//&nbsp; &nbsp; " "</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(130, 185, 255); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">func</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">split</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">(</span><span style="color: rgb(52, 187, 200);" class="">...</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(205, 121, 35);" class="">where</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 187, 200);" class="">...</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class="">)&nbsp;<span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">-&gt;</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class=""><wbr class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">SubSequence</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(233, 175, 205);" class="">]</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(214, 214, 214);" class=""><span class="gmail-m_2877875185135332990Apple-converted-space">&nbsp;</span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">// Iterable where .Iterator.Element == (Sequence where .Iterator.Element == Self.Iterator.Element)</span></div><div style="margin: 0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(214, 214, 214); background-color: rgba(0, 0, 0, 0.901961);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">}</span></div></div></div></div></blockquote></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></div></div></blockquote></div></div></blockquote></div><div class=""><br class=""></div></span>And just to be explicit,&nbsp;<div class="">struct Set: Iterable {…}</div><div class="">struct Dictionary: Iterable {…}</div><div class="">struct Array: Sequence {…}</div><div class="">etc.</div><div class=""><br class=""></div><div class="">Hopefully at some point:</div><div class="">struct OrderedSet: Sequence {…}</div></div></blockquote></div></div></div></div></blockquote></div><br class=""></div></body></html>