Created
December 26, 2019 03:43
-
-
Save kunigami/fde4b9553dcff1dc9927a403b2d9fd55 to your computer and use it in GitHub Desktop.
This file contains 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
T = TypeVar('T') | |
def first(xs: List[T]) -> Optional[T]: | |
if (len(xs) == 0): | |
return None | |
return xs[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment