Skip to content

Instantly share code, notes, and snippets.

@siddhartha-gadgil
Created March 22, 2014 11:34
Show Gist options
  • Save siddhartha-gadgil/9705714 to your computer and use it in GitHub Desktop.
Save siddhartha-gadgil/9705714 to your computer and use it in GitHub Desktop.
_find_ : {A : Set} → List A → (A → Bool) → Option A
[] find _ = None
(x :: xs) find p = if (p x) then (Some x) else (xs find p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment