Clojure - un-alias



Removes the alias for the symbol from the namespace.

Syntax

Following is the syntax.

(un-alias namespace-name aliasname)

Parameters − ‘namespace-name’ is the namespace which is attached to an alias. ‘aliasname’ is the alias name which has been mapped to the namespace.

Return Value − Removes the alias from the namespace.

Example

Following is an example of un-alias in Clojure.

(ns clojure.examples.example
   (:gen-class))
(defn example []
   (alias 'string 'clojure.core)
   (ns-unalias 'clojure.core 'string))
(example)
clojure_namespaces.htm
Advertisements