Welcome! Please see the About page for a little more info on how this works.

0 votes
in Sequences by

Javascript arrays has find which returns the first element in the array which satisfies a predicate. In Clojure this can be implemented as

(defn find [p xs] (first (filter p xs))

Would this be a good addition to core?

1 Answer

+2 votes
selected by
Best answer

It has been discussed and rejected before https://clojure.atlassian.net/browse/CLJ-2056