Incanter,一个图形/绘图工具,运行良好:
[incanter "1.5.6"] ; in project.clj
; in repl:
(do (use '(incanter core stats charts)) (view (histogram (sample-normal 1000))))
但是我如何以编程方式列出 leiningen-dependency 中的命名空间? all-ns 不起作用:
; comes up empty UNTILL you (use 'incanter.charts):
(filterv #(.contains % "charts") (mapv str (all-ns)))
有办法做到这一点吗?
最佳答案
(all-ns)
仅返回已加载的命名空间(直接或间接,例如通过使用 require
或 use
)。
要搜索尚未加载的命名空间,您可以使用 tools.namespace
和其 clojure.tools.namespace.find
的功能命名空间。
关于reflection - Clojure 列出 leiningen 命名空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35566406/