Verificando a presença de um elemento em um vetor em Clojure

Para determinar se um vetor contém um elemento, use a somefunção ( não contains? ).

someretornará o primeiro elemento para o qual a função de predicado retorna true, e nilcaso contrário. contains?verifica se uma chave está contida na coleção. Em vetores, as chaves são os índices dos elementos, portanto, ele verifica se um elemento existe naquele índice.

; some returns the first element that returns true from the function
(some #(= 3 %) [1 2 3 4 5]) ; => 3
(some #(= :nope %) [1 2 3 4 5]) ; => nil

; contains returns true if an element exists at that index in the vector
(contains? [1 1 1 1 1] 3) ; => true
(contains? [5 5 5 5] 5) ; => false
(contains? [nil nil nil] 1) ;=> true