Created
June 6, 2018 09:24
-
-
Save stathissideris/ac4d64e2d014af3ac9644855beaa15c7 to your computer and use it in GitHub Desktop.
Alias Clojure namespace without requiring it (helps with long namespaced keywords)
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
(defn ensure-namespace-alias [ns alias-sym] | |
(when-not (find-ns ns) | |
(create-ns ns)) | |
(alias alias-sym ns)) | |
(ensure-namespace-alias 'this.is.a.long.namespace 'long) | |
::long/foo => :this.is.a.long.namespace/foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment