There is already something in the comments about using macros, but as someone pointed out, this precludes the use of the HOF function. You can get around this, although it may be that the treatment is no worse than the disease. For example, imagine your function
(defn foo* [xy] (+ xy))
Then instead of writing
(defmacro foo [xy] (warn) `(foo* xy)) (foo 1 2) (map foo [5 6] [7 8])
You can make macro exposure a function return, which of course can be used like any other:
(defmacro foo [] (warn) `foo*) ((foo) 1 2) (map (foo) [5 6] [7 8])
Itβs probably not worth the awkwardness, but it makes it possible to complain whenever an outdated function is used, while still maintaining the ability to use HOF.
source share