Avatar
@omochimetaru ウオオなるほど!w func getNames(cats: [Cat]) -> [Character] { return cats.flatMap { $0.name } } だと ["m", "i", "k", "e", "m", "i", "k", "e", "m", "i", "k", "e"] になりますね https://github.com/apple/swift-evolution/blob/master/proposals/0187-introduce-filtermap.md の例だと挙動が壊れないので混乱してしまいました‥ 😅 ありがとうございます!
swift-evolution - This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.