You're viewing version 1.2.0 of ns-unmap. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

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:3222 top

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

Comments top

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