extension Array where Element: _ArrayType, Element.Generator.Element: Any { func transpose() -> [Element] { if self.isEmpty { return [Element]() } let count = self[0].count var out = [Element](repeating: Element(), count: count) for outer in self { for (index, inner) in outer.enumerated() { out[index].append(inner) } } return out }}
I am getting this error in Swift 3.0 after converting it from Swift 2.2. The elements of the array are also array. So how to define it in Swift 3.0?