6
爲什麼地圖和關鍵字都有一個額外的參數與默認參數,而套不?爲什麼clojure集不接受默認參數?
這是實施細節還是特定的設計決策?
({:a 2} :b :not-found) ;;=> :not-found
(:b {:a 2} :not-found) ;;=> :not-found
;; This seems counter intuitive.
(#{:a} :b :not-found) ;;=> clojure.lang.ArityException
(:b #{:a} :not-found) ;;=> :not-found
這肯定是一個異常,可以很容易和有用地擦除:請參閱[@ amalloy的答案](http://stackoverflow.com/a/38444128/1562315)。 – Thumbnail