2013-07-04 17 views
2

爲什麼不Clojure中工作,則下列功能:元數重載Clojure中

(defn tests 
    [] 0 
    [a b] 1) 

它提供了以下錯誤:clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: a in this context

回答

7

每個需要用括號包圍

(defn tests 
    ([] 0) 
    ([a b] 1))