Skip to content

Instantly share code, notes, and snippets.

@shigemk2 shigemk2/man.hs
Created Mar 4, 2015

What would you like to do?
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
You can’t perform that action at this time.