如何将符号重新绑定到 Clojure 中的新数据结构。例如:
(def hash-map-one {:a "foo" :b "bar"})
(def hash-map-two {:c "gaz" :d "waka"})
;; right here make hash-map-one equal to hash-map-two very quickly
;; if this were python I would say hash-map-one = hash-map-two
有点动机,我这样做是因为我有一个依赖于数据文件的 Web 服务,并且该数据文件将被更新,此时我需要在不停机的情况下“切换”到新数据。
提前致谢!