若呼叫這個函式搭配[ String : Int ]型別的 Dictionary ,那麼編譯器會推論 K 與 V 等型別參數是代表 String 與 Int 。在這個狀況,函式的參數便會是[ String : Int ]型 ...
確定! 回上一頁