在clojure中,声明全局变量的最佳方法是什么,需要在函数中更改其值,并且需要在其他命名空间中访问该全局变量
前任:
(ns ..main
.....)
(def global_variable nil)
..
(defn main ...
Change the value of global variable here
)
Another name space
(ns accessvariable ...)
(println (main/global_variable))
Run Code Online (Sandbox Code Playgroud)
做这个的最好方式是什么?