on Sun Feb 05 2017, Patrick Pijnappel <[email protected]> wrote:

> Note that zip(a.indices, a) requires advancing the index twice each
> iteration, which for non-array collections is not necessarily super
> trivial. Considering we're talking about such a low-level operation as
> iterating through a collection this might be worth considering.

If you're worried about this, there's a really easy solution: write your
loop over a.indices and the subscript a using those indices to get the
element.

> Personally I'm in favor of adding indexed().

As mentioned earlier in the thread, I'm strongly opposed to adding it at
this time.

-- 
-Dave

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to