I have a group of numeric functions in Clojure that I want to validate the arguments for. There are numerous types of arguments expected by the functions, such as positive i
A case where you need a macro would be if you wanted to modify the language to automatically add the tests to any function defined within a block, like this:
(with-function-validators [test1 test2 test4]
(defn fun1 [arg1 arg2]
(do-stuff))
(defn fun2 [arg1 arg2]
(do-stuff))
(defn fun3 [arg1 arg2]
(do-stuff)))