macro | since v0.0-2985 | ![]() | Edit |
(source n)
Prints the source code for the given symbol name
, if it can find it. This
requires that the symbol resolve to a Var defined in a namespace for which the
.cljs is in the classpath.
(source comment)
;; Prints:
;; (defmacro comment
;; "Ignores body, yields nil"
;; {:added "1.0"}
;; [& body])
;;
;;=> nil
Prints the source code for the given symbol, if it can find it. This requires that the symbol resolve to a Var defined in a namespace for which the .cljs is in the classpath. Example: (source filter)
(defmacro source
[n]
`(println ~(or (source-fn &env n) (str "Source not found"))))