Avatar
@swift-4.0.3 extension Sequence { public func flatten<T>() -> [T] where Element : Sequence, Element.Element == T { return flatMap { $0 } } } let a: [[Int]] = [[2, 3], [5]] let b: [Int] = a.flatten() print(b)