Avatar
omochimetaru 1/26/2020 4:13 PM
// the function is defined something like this mutating func project<T>(_ transform: (inout Self.Element) throws -> T) rethrows -> <variadic value of T's> { return try indices.map { index in try transform(&self[index]) } } (edited)