You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a pitch related to Swift's ownership model for mutating iterated collection's elements in-place. I do it a lot in this package, so I'm looking forward to it. The gist of it is replacing the first with the second example:
varindex= words.startIndex
while index < words.endIndex {mutate(&words[index])
words.formIndex(after:&index)}
for inout word in words {mutate(&word)}
The text was updated successfully, but these errors were encountered:
I suppose this is a closer comparison. I've just gotten used to while loops because they are always fast, whereas I feel like I have to performance profile each instance of .reversed().
for index in words.indices {mutate(&words[index])}
There's a pitch related to Swift's ownership model for mutating iterated collection's elements in-place. I do it a lot in this package, so I'm looking forward to it. The gist of it is replacing the first with the second example:
The text was updated successfully, but these errors were encountered: