Created
November 12, 2017 03:44
-
-
Save ethagnawl/98305bec7dfa4645a1733029abc0e83e 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
parseArgs :: [a] -> Maybe (a, a) | |
parseArgs [x, xx] = Just (x, xx) | |
parseArgs _ = Nothing | |
main = do | |
print $ parseArgs [1, 2] -- Just (1, 2) | |
print $ parseArgs [1, 2, 3] -- Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment