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:
var index = words.startIndex
while index < words.endIndex {
mutate(&words[index])
words.formIndex(after: &index)
}
for inout word in words {
mutate(&word)
}
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: