Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 25th, 2012  |  syntax: None  |  size: 0.16 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ;; ardumont's solution to Merge with a Function
  2. ;; https://4clojure.com/problem/69
  3.  
  4. #(reduce (fn [a [k v]] (assoc a k (if (a k) (% (a k) v) v))) %2 (apply merge %&))