<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Dec 2, 2017, at 12:28 PM, Cao, Jiannan via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" 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; margin: 0px; font-stretch: normal; line-height: normal; background-color: rgb(255, 255, 255);"><font face="Menlo" class=""><span class="" style="font-size: 11px;">The question is that, whether the original Collection&nbsp;Protocol requires index from lower to higher (startIndex &lt; endIndex).</span></font></div></div></blockquote></div><div class=""><br class=""></div><div class="">`Collection` does require that `startIndex &lt;= endIndex`, and in general, that `i &lt; c.index(after: i)` for all `i` in `c.startIndex ..&lt; c.endIndex`. Unfortunately, this may not be explicitly documented anywhere.</div><div class=""><br class=""></div><div class="">(Also unfortunately, `index(after:)` doesn't appear at all in Apple's documentation for `Collection`!)</div><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div class=""><div style="font-size: 12px; " class="">--&nbsp;</div><div style="font-size: 12px; " class="">Brent Royal-Gordon</div><div style="font-size: 12px; " class="">Architechies</div></div></span>

</div>
<br class=""></body></html>