Skip to content

Instantly share code, notes, and snippets.

@patrickt
Created March 8, 2010 04:15
Show Gist options
  • Save patrickt/324863 to your computer and use it in GitHub Desktop.
Save patrickt/324863 to your computer and use it in GitHub Desktop.
-- this is almost exactly the code that implements booleans in haskell
data Bool = True | False
and :: Bool -> Bool -> Bool
and True x = x
and False _ = False -- the underscore means the parameter is not used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment