What is the best way to test whether a list contains a given value in Clojure?
In particular, the behaviour of contains? is currently confusing me:
contains?
Here's a quick function out of my standard utilities that I use for this purpose:
(defn seq-contains? "Determine whether a sequence contains a given item" [sequence item] (if (empty? sequence) false (reduce #(or %1 %2) (map #(= %1 item) sequence))))