Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created March 4, 2015 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shigemk2/b7c63775c5fa63d452ac to your computer and use it in GitHub Desktop.
Save shigemk2/b7c63775c5fa63d452ac to your computer and use it in GitHub Desktop.
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