I wonder why the closure in the Array method mutating func withUnsafeMutableBufferPointer<R>(_ body: (inout UnsafeMutableBufferPointer<Array.Element>) throws -> R) rethrows -> R
takes an _inout_ parameter. The closure is called with a pointer to the contiguous array storage, and I fail to imagine an example where it makes sense to assign a new value to the parameter. Any insights are welcome! Regards, Martin _______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users