Avatar
↓こっちの方が好みかも。 func fix<T, U>(_ f: @escaping (T...) -> U) -> ([T]) -> U { return f as! ([T]) -> U } let dict: [String: Int] = fix(Dictionary.init)([ ("a", 2), ("b", 3), ("c", 5) ]) (edited)