Created
July 11, 2017 16:00
-
-
Save alex-dixon/ef8969180060337d0705af1137293b7f to your computer and use it in GitHub Desktop.
Confusion about symbols, quoting
This file contains hidden or 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
(def my-ns 'precept.app-ns) | |
my-ns ;; => precept.app-ns | |
(ns-interns my-ns) ;; nth not supported on Symbol | |
(ns-interns 'precept.app-ns) ;; works | |
(ns-interns (quote precept.app-ns)) ;; works | |
'precept.app-ns ;; => precept.app-ns | |
(quote precept.app-ns) ;; => precept.app-ns | |
`~my-ns ;; => precept.app-ns | |
(ns-interns `~my-ns) ;; nth not supported on Symbol | |
(quote (quote precept.app-ns)) ;; => 'precept.app-ns | |
`(quote ~my-ns) ;; => 'precept.app-ns | |
(ns-interns `(quote ~my-ns)) ;; argument must be quoted Symbol |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment