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 the classic Lisp solution:
(defn member? [list elt] "True if list contains at least one instance of elt" (cond (empty? list) false (= (first list) elt) true true (recur (rest list) elt)))