Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve merge-with to work with map-like types that don't implement c…

…lojure.lang.IFn for lookup

Signed-off-by: Stuart Halloway <>
  • Loading branch information...
commit 673f4c70a82b6af9379aa7b7e8188c8b809fed51 1 parent fde4f64
@khinsen khinsen authored stuarthalloway committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/clj/clojure/core.clj
2  src/clj/clojure/core.clj
@@ -2273,7 +2273,7 @@
(let [merge-entry (fn [m e]
(let [k (key e) v (val e)]
(if (contains? m k)
- (assoc m k (f (m k) v))
+ (assoc m k (f (get m k) v))
(assoc m k v))))
merge2 (fn [m1 m2]
(reduce merge-entry (or m1 {}) (seq m2)))]
Please sign in to comment.
Something went wrong with that request. Please try again.