使用Clojure工作,我们有以下几点:Clojure的协议/功能优先
(defprotocol Greeter (hello [args] "Say hello"))
(extend-protocol Greeter
String
(hello [this] (str "Hello " this)))
(hello "world") ; "Hello world"
到目前为止,一切都很好。然后,我们添加:
(defn hello [args] (str "Wassup " args "?"))
这改变了以前的形式输出到:
(hello "world") ; "Wassup world?"
有没有一种方法,使该协议优先于功能?