Skip to content

Instantly share code, notes, and snippets.

@llasram
Created August 13, 2014 12:51
Show Gist options
  • Save llasram/995be648aa22e0630ce8 to your computer and use it in GitHub Desktop.
Save llasram/995be648aa22e0630ce8 to your computer and use it in GitHub Desktop.
ffilter
(defn ffilter
"Returns the first item in `coll` for which `(pred item)` is true."
[pred coll] (reduce (fn [_ x] (if (pred x) (reduced x))) nil coll))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment