I want to have a way to print progress message before and after invoking a function/expression. Came up with this macro
(defmacro run-with-msg [msg & body] (doto *out* (. write (format "%s..." msg)) (. flush)) `(let [res# ~@body] (println "done") res#)) user=> (run-with-msg "Working" (Thread/sleep 2000)) Working...done nil But msg is not printed by itself. In example above I don't see "Working...". As you can see I tried to print directly to *out* (instead of printf) and explicitly flushing *out* with no avail. Any idea what is going on here? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en