Created
August 4, 2010 00:03
-
-
Save gfredericks/507413 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Both of these are inputs at runtime, separately | |
(def lib "(ns my-ns) (defn x [n] (+ n 5))") | |
(def code '(x 12)) | |
(eval code) ;; doesn't work of course | |
;; I want to be able to do this without "using" the namespace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A eval-in-ns function could be something like this, I think:
That
(use ..)
is mandatory since you don't want to do that in every namespace you useeval-in-ns
.