直接從code 來看兩者之間和map 的差異CompactMap let scores = ["1", "2", "3", "four", "5"] let mapped: [Int?] = scores.map { str in Int(str) } ...
確定! 回上一頁