Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defmacro with-source-code [[defsym name & body :as form]]
- `(~defsym ~(with-meta name {:source-code `'~form}) ~@body))
- (defmacro get-source-code [var-name] `(:source-code (meta (var ~var-name))))
- (with-source-code (defn foobar [x y] (/ x y)))
- (get-source-code foobar)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement