How to list the functions of a namespace?

后端 未结 4 1868
悲哀的现实
悲哀的现实 2020-11-29 18:17

I would like to know how to list all functions of a Clojure namespace. I\'ve done some research but I\'m not there yet. I already found out how to list the methods of a Java

4条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 19:02

    Have a look here. More specifically:

    ;; Sometimes I like to ask which public functions a namespace provides.
    (defn- ns-publics-list [ns] (#(list (ns-name %) (map first (ns-publics %))) ns))
    

提交回复
热议问题