1
我尋求信息類型的提示用Clojure的範圍,例如,如果我寫Clojure中提示類型的範圍?
(defn big-add [^BigInteger x y] (.add x y))
是一樣
(defn big-add [^BigInteger x ^BigInteger y] (.add x y))
?假設我寫
(defn big-sum
([] BigInteger/ZERO)
([^BigInteger x] x)
([^BigInteger x & more] (.add x (apply big-sum more))))
是否Clojure的假設more
充滿BigInteger
?假設我想不告訴它?我會做類似
(defn foo [^BigInteger x & ^Long more] ...)
?