Created
January 13, 2009 00:45
-
-
Save vito/46270 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Gender = Male | Female | |
data Person = Person { name :: String | |
, gender :: Gender | |
, doSomething :: Bool -> Bool | |
} | |
bill = Person { name = "Bill" | |
, gender = Male | |
, doSomething = not | |
} | |
main = do print $ (doSomething bill) True -- Use their "doSomething" function on True | |
print $ name bill -- Their name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment