ns-unmap

clojure.core

  • (ns-unmap ns sym)
Removes the mappings for the symbol from the namespace.

1 Example top

  • user=> (def foo 1)
    #'user/foo
    
    user=> foo
    1
    
    user=> (ns-unmap 'user 'foo) ; explicit
    nil
    
    user=> (ns-unmap *ns* 'foo) ; convenient
    nil
    
    user=> foo
    "Unable to resolve symbol: foo in this context"
    
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:3705 top

(defn ns-unmap
  "Removes the mappings for the symbol from the namespace."
  {:added "1.0"
   :static true}
  [ns sym]
  (.unmap (the-ns ns) sym))
Vars in clojure.core/ns-unmap:
Used in 0 other vars

Comments top

No comments for ns-unmap. Log in to add a comment.