I have a clojure function:
(defn f [arg1 arg2]
...)
I would like to test if arg1 and arg2 are numeric (only numeric types should pass – not numerically formatted strings). There are, of course, a whole bunch of ways to do this, but I’d like to do it as idiomatically as possible. Suggestions?
Edit: I know about :pre. Any comment on whether or not that is an appropriate/necessary way to handle this would be appreciated.
Pre-conditions can do that:
See http://clojure.org/special_forms#toc9 for docs.