Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; 4clojure Problem 121
- ;; https://www.4clojure.com/problem/121
- (defn uce [[f & args]]
- (let [args' (map #(cond (coll? %) (uce %)
- (symbol? %) (fn [m] (m %))
- :else (fn [m] %)) args)]
- (fn [m]
- (apply f (map #(% m) args')))))
- ;; should evaluate to 2, but evaluates to 8
- ((uce '(/ a b)) '{b 8 a 16})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement