Posted By

icqheretic on 12/29/09


Tagged

clojure ICQHERETIC BINDS


Versions (?)

Print all binds in a lib


 / Published in: Clojure
 

  1. #!/usr/bin/env clj
  2.  
  3. ; Define and load all the libraries into our namespace that we want all binds for:
  4. (def *supported-libraries* ['clojure.core 'clojure.contrib.duck-streams 'clojure.contrib.seq-utils 'clojure.contrib.str-utils 'clojure.contrib.repl-utils])
  5. (doseq [k *supported-libraries*] (use k))
  6.  
  7.  
  8. (defn print-public-binds
  9. "Prints all binds defined in library $s."
  10. [s]
  11. (doseq [k (keys (ns-publics s))] (println k)))
  12.  
  13.  
  14. (doseq [s *supported-libraries*] (print-public-binds s))

Report this snippet  

You need to login to post a comment.