Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有一个未绑定的动态变量:
(def ^:dynamic *config-param*)
然后,后来,它是这样设置的:
(alter-var-root #'*config-param* (constantly 42)))
但是,现在,我想解绑它(也许是为了测试目的)。我该怎么做?
(注意:我不赞成使用动态变量!我只是在问。)
像这样使用.unbindRoot:
.unbindRoot
(.unbindRoot #'*config-param*)