If I've been playing around in a clojure REPL (might have been experimenting with (assoc) or (seq) or (reduce) and created some temporary maps for examples), but wanted to print a listing of variables defined in that session, is there a way to do this? Something like (println def) or something?
You can use (dir user)
if you are in the user
namespace. Or any other ns you are interested into. This shows you all the def
-ed things. If it's not there (it usually gets use
ed automatically in the REPL, you can find it in clojure.repl/dir
).