The mutating version would have a parameter label to differentiate it: let a = [1, 2, 3, 4, 5]
let b = a.reduce(into: []) { (result, element) in
result.append(element * 2)
}
--
GL
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution
