1.3.0 permalink Arrow_down_16x16

alias

clojure.core

  • (alias alias namespace-sym)
Add an alias in the current namespace to another
namespace. Arguments are two symbols: the alias to be used, and
the symbolic name of the target namespace. Use :as in the ns macro in preference
to calling this directly.

1 Example top

  • user=> (require 'clojure.string)
    nil
    
    user=> (alias 'string 'clojure.string)
    nil
    
    user=> (string/capitalize "hONdURas")
    "Honduras"
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:3787 top

(defn alias
  "Add an alias in the current namespace to another
  namespace. Arguments are two symbols: the alias to be used, and
  the symbolic name of the target namespace. Use :as in the ns macro in preference
  to calling this directly."
  {:added "1.0"
   :static true}
  [alias namespace-sym]
  (.addAlias *ns* alias (the-ns namespace-sym)))
Vars in clojure.core/alias:
Used in 0 other vars

Comments top

No comments for alias. Log in to add a comment.