How can I undefine a function in Clojure?

前端 未结 3 1048
你的背包
你的背包 2021-01-07 17:56

Often I need to undefine a function in clojure. If I define something with defn how can I undefine it?

3条回答
  •  生来不讨喜
    2021-01-07 18:06

    I think, that you can use ns-unmap to do this.

    P.S. Couldn't add this code into comment, so i put it here. To unmap function in current namespace, you need to use following code:

    (ns-unmap *ns* 'method) 
    

提交回复
热议问题