title: merge-with merge: can this be simplified?
body: <p>I have a list of maps, and one of the keys in the map is a key that may repeat. I'd like to dedup/merge the list. So for example:</p>
  
  <pre><code>(def data [{:id 1 :a 2 :b 3 :c 4} {:id 1 :c 5 :d 6} {:id 2 :a 100 :b 101 :c 102} {:id 2 :a 103 :d 104} {:id 2 :a 200 :f 201}])
  </code></pre>
  
  <p>And I'd like to end up with:</p>
  
  <pre><code>[{:id 1 :a 2 :b 3 :c 5 :d 6} {:id 2 :a 200 :b 101 :c 102 :d 104 :f 201}]
  </code></pre>
  
  <p>(I've phrased the question so that merge/merge-with works, but the truth is I don't really care what happens with overlapping values; the first in, or the last in, can win).</p>
  
  <p>What I've got is:</p>
  
  <pre><code>(vals (apply merge-with merge (into #(hash-map (:id %) %) data)))
  </code></pre>
  
  <p>Which does work, but I'm wondering if there's a better, more consise, or elegant, way of doing this. Also I wonder about performance because I think <code>into</code> is doing a full copy of the sequence, and forcing the entire thing into memory (the original data was a lazy sequence).</p>