I think there was also something mentioned in this pitch which might be the more fundamental mutating foreach:
for inout y in &array {
// The following updates the array elements "in place"
y += 1
}
I think there was also something mentioned in this pitch which might be the more fundamental mutating foreach:
for inout y in &array {
// The following updates the array elements "in place"
y += 1
}