Print all binds in a lib


/ Published in: Clojure
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.