Suppose I want to apply the parameter p1 and p2 to a list of function calls:
(defn some-func [] (let [p1 a p2 b] (f1 p1 p2) (f2 p1 p2) (f3 p1 p2) ... )) What's a good and concise way of doing this?
Suppose I want to apply the parameter p1 and p2 to a list of function calls:
(defn some-func [] (let [p1 a p2 b] (f1 p1 p2) (f2 p1 p2) (f3 p1 p2) ... )) What's a good and concise way of doing this?
You may want to review the Clojure CheatSheet. The function juxt can do what you want.
Beware, though, juxt is somewhat obscure and can make it hard to read your code.