How to show documentation in Clojure -
i following :
(defn ss [] "kjhhj") (doc ss) but "nil" returned. why this?
update:
if :
(defn tt "kjhhj" [] 1) (str (doc tt) ) as shown empty string... "doc" output go out or something?
the docstring comes before arguments function. have defined function no docstring returns string.
user> (defn ss [] "kjhhj") #'user/ss user> (ss) "kjhhj" user> (doc ss) ------------------------- user/ss ([]) nil nil user> (defn tt "kjhhj" []) #'user/tt user> (tt) nil user> (doc tt) ------------------------- user/tt ([]) kjhhj nil user>
Comments
Post a Comment