Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defn r-some?
"Super fast version of clojure.core/some that does minimal allocation"
[pred coll]
(reduce
(fn [acc v]
(if-let [val (pred coll)]
(reduced val)
acc))
false
coll))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.