Avatar
omochimetaru 4/18/2019 4:04 AM
@swift-5.0.3 let cs: [Character] = ["a", "b"] let str: String = "cde" func concat<T>(_ a: AnyCollection<T>, _ b: AnyCollection<T>) -> [T] { return a.map { $0 } + b.map { $0 } } let r = concat(AnyCollection(cs), AnyCollection(str)) print(r)