[swift-evolution] [Idea] Add an (Index, Element) sequence to CollectionType

Dave Abrahams dabrahams at apple.com
Thu Dec 31 11:28:32 CST 2015


> On Dec 29, 2015, at 8:06 AM, Wallacy via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I believe that the current behavior was thought when Slices had indices starting with zero.

The current behavior was intentional (and intentionally left as-is when array slices changed); indices are not integers for all collections, and there are many ways to get the indices with the elements, including zip(x.indices, x)

-Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151231/fcb30727/attachment.html>


More information about the swift-evolution mailing list