Avatar
@swift-6.1.2 swift let list = [("One", 1), ("Two", 2), ("Two", 2)] let dict0 = Dictionary(list, uniquingKeysWith: { $0 }) let dict1 = Dictionary(list, uniquingKeysWith: { $1 }) let dict00 = Dictionary(list, uniquingKeysWith: { $0.0 }) let dict01 = Dictionary(list, uniquingKeysWith: { $0.1 }) (edited)