Unfortunately, doc
is a macro, and therefore it is not a first-class citizen in clojure because you cannot use it as a function of a higher order.
user> (doc doc) ------------------------- clojure.repl/doc ([name]) Macro Prints documentation for a var or special form given its name
what you see is a documentation search result for %
twice.
user> (doc %) nil user> (with-out-str (doc %)) ""
because the doc call completed execution during macro expansion before the call starts on the map (at runtime). However, you can get the doc string directly from metadata in var
containing functions
user> (map
source share