• (source n)
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 .clj is in the classpath.

Example: (source filter)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/repl_utils.clj:123 top

(defmacro source
  "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 .clj is in the classpath.
  
  Example: (source filter)"
  {:deprecated "1.2"}
  [n]
  `(println (or (get-source '~n) (str "Source not found"))))
Vars in clojure.contrib.repl-utils/source: get-source defmacro concat list or println seq str

Comments top

No comments for source. Log in to add a comment.