Equivalent of Java's toString() for Clojure functions
问题 some Java code I'm using invokes toString() on my Clojure function objects, which return something like #<ns$something something.something$something@7ce1eae7>> - I want to return something else...presumably there's a way to include some metadata in the functions so their objects' toString() returns that instead ? 回答1: If you just want to make the REPL print-out of your objects more meaningful, you can implement a defmethod print-method for the class in question. Here's a shortened version of