Skip to content

Instantly share code, notes, and snippets.

@alex-dixon
Created July 11, 2017 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alex-dixon/ef8969180060337d0705af1137293b7f to your computer and use it in GitHub Desktop.
Save alex-dixon/ef8969180060337d0705af1137293b7f to your computer and use it in GitHub Desktop.
Confusion about symbols, quoting
(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