Example:- I am using a library [called
failjure. For some reason I am not allowed to link that library here] for representing failed computations. So coming up with functions that return nothing of significance or return a failure is a common scenario.
(defn transition-possible? [id] (let [state1 (foo id) state2 (bar id)] (if (= state1 state2) (f/fail "The states cannot be equal"))))
The return value of
transition-possible? does not matter here. You are only interested if it returns a
failure. But naming it
transition-possible? give an impression that the function would return a
false which is the case here.
How should I go about naming the function here?