So, I want to execute a bunch of code first, and then ask the user if he wants to do it again. I thought the most convenient way to do this would be a do-while loop, as in C ++, and since I could not find any do-while functions in Clojure, I wrote the following:
(defmacro do-while "Executes body before testing for truth expression" [test & body] `(do (do ~@body ) (while ~test ~@body )))
Would it be better (as in the more idiomatic Clojure -ish) way to write this macro, or maybe it is better to do what I want without going through the do-while route?
wrongusername
source share