How to list the functions of a namespace?

后端 未结 4 1864
悲哀的现实
悲哀的现实 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:15

    You can use dir. (Perhaps this wasn't available when the question was first asked.)

    user=> (dir clojure.string)
    blank?
    capitalize
    escape
    join
    lower-case
    re-quote-replacement
    replace
    replace-first
    reverse
    split
    split-lines
    trim
    trim-newline
    triml
    trimr
    upper-case
    nil
    

提交回复
热议问题