[swift-evolution] [Discussion] Updating Struct Values While Looping
Paul Ossenbruggen
possen at gmail.com
Mon Mar 7 12:30:52 CST 2016
Thanks for pointing this out!
Sent from my iPhone
> On Mar 7, 2016, at 10:11 AM, Pyry Jahkola <pyry.jahkola at iki.fi> wrote:
>
>
>> On 07 Mar 2016, at 10:57, Paul Ossenbruggen via swift-evolution <swift-evolution at swift.org> wrote:
>>
>> for i in 0..<codons.count { codons[i] = ... }
>
> I don't disagree, but quick reminder: you might want to use `indices` instead of `..<`:
>
> for i in codons.indices { codons[i] = ... }
>
> — Pyry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160307/da4f292f/attachment.html>
More information about the swift-evolution
mailing list