Yep, it's definitely possible. The thing you're running into here is that defn
(or rather, the def
special form that it expands to) attaches a docstring to the symbol iff the argument in second place is a string.
You can circumvent this by setting the :doc
metadata yourself.
(defn ^{:doc (apply str "Here are some numbers " (range 10))} my-function
[]
(println "This function does nothing right now."))
Or potentially by writing your own macro - but I think the above is the most straightforward way of doing it.