lundi 22 février 2016

Clojure list leiningen namespaces

Incanter, a graphing/plotting tool, works fine:

[incanter "1.5.6"] ; in project.clj
; in repl:
(do (use '(incanter core stats charts)) (view (histogram (sample-normal 1000))))

But how can I programmatically list namespaces from leiningen-dependencies? all-ns does not work:

; comes up empty UNTILL you (use 'incanter.charts):
(filterv #(.contains % "charts") (mapv str (all-ns)))

Is there a way to do this?





Aucun commentaire:

Enregistrer un commentaire