也許明顯,但鑑於該代碼(從http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/reify):具體化,的ToString
(defn reify-str []
(let [f "foo"]
(reify Object
(ToString [this] f))))
(defn -main [& args]
(println (reify-str))
(System.Console/ReadLine))
爲什麼會出現這樣的輸出?
#<ui$reify_str$reify__4722__4727 foo>
相反的:
foo
我正在ClojureCLR在Windows中,如果有幫助。謝謝!
看起來像這樣:http://stackoverflow.com/questions/5306015/equivilent-javas-tostring-for-clojure-functions是相關的 – sw1nn 2012-04-16 19:19:18