Last active
February 26, 2016 02:20
-
-
Save milesrout/b1194fff89574bc50c8e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def attempt(f, is_valid, *args): | |
return next(y for y in itertools.starmap(f, itertools.repeat(args)) if is_valid(y)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment