Avatar
@swift-5.0.3 let times = [ "Hudson": "38", "Clarke": "42", "Robinson": "35", "Hartis": "DNF" ] let finishers1 = times.compactMapValues { Int($0) } let finishers2 = times.compactMapValues(Int.init) print(finishers1) print(finishers2)