Skip to content

Instantly share code, notes, and snippets.

@dagda1
Created September 28, 2014 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dagda1/f20ba67acb76534e4cf0 to your computer and use it in GitHub Desktop.
Save dagda1/f20ba67acb76534e4cf0 to your computer and use it in GitHub Desktop.
(defn diff [l1 l2]
(let [a (group-by identity l1)
b (group-by identity l2)]
(mapcat #(repeat
(-
(count (second %))
(count (get b (key %))))
(key %)) a)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment