Skip to content

Instantly share code, notes, and snippets.

@bouzuya
Created February 17, 2013 11:39
Show Gist options
  • Select an option

  • Save bouzuya/4971134 to your computer and use it in GitHub Desktop.

Select an option

Save bouzuya/4971134 to your computer and use it in GitHub Desktop.
(use 'clojure.test)
(with-test
(defn remove-x [x v]
(vec (map #(set (remove #{x} %)) v)))
(are
[x v expected]
(= (remove-x x v) expected)
nil [] []
2 [#{1 2 3}] [#{1 3}]
2 [#{1 2 3} #{1 2 3} #{1 2 3}] [#{1 3} #{1 3} #{1 3}]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment