Hi, clojurians! I suspect that this tiny wrapper should have even more concise and clojury form:
(defn inject [g]
(fn [f]
(fn [e]
(g e)
(when f (f e)))))
Any ideas?
@ul: So g
is side-affecty, like a logging statement?
I honestly don’t see anything wrong with how it is. I wouldn’t something like that for every application, but I could see it being useful for certain things.