Created
March 4, 2015 11:40
-
-
Save shigemk2/b7c63775c5fa63d452ac 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
data Person = Man Int | Woman | |
plus :: Person -> Int | |
plus (Man i) = i + 1 | |
plus Woman = 99 | |
main = do | |
print $ plus $ Man 1 | |
print $ plus $ Woman |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment