> What you're asking for can already be done with `zip(col.indices, col)`. And 
> in my experience the need for this sort of thing is rare enough that there's 
> no need to have a dedicated property for it in the stdlib. The few times that 
> I've needed this sort of thing, I've always just said
>  
> for index in col.indices {
>     let elt = col[index]
>     // ...
> }
>  
> and that's pretty simple. But if I ever did need to map it, I'd just use the 
> aforementioned zip() expression. 

I know the zip trick and have used it several times. In one project, I used it 
frequently enough that I created an extension. Personally, I would like to see 
a more convenient way to do this, although it's not that strong of a preference.

-- 
Brent Royal-Gordon
Architechies

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to