Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active February 8, 2017 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/830e2fb84297b5bd2acf7a1543f75c54 to your computer and use it in GitHub Desktop.
Save deque-blog/830e2fb84297b5bd2acf7a1543f75c54 to your computer and use it in GitHub Desktop.
findFailing :: [a] -> (a -> Result) -> Maybe (a, Result)
findFailing smaller runSub =
let results = map runSub smaller
in find (isFailure . snd) (zip smaller results)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment