Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created Mar 4, 2015
Embed
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