Skip to content

Instantly share code, notes, and snippets.

@gokulnath
Created November 2, 2018 04:33
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 gokulnath/6bbb7c59972113b4e7590d17505ff959 to your computer and use it in GitHub Desktop.
Save gokulnath/6bbb7c59972113b4e7590d17505ff959 to your computer and use it in GitHub Desktop.
data Mood = Blah | Woot deriving Show
changeMood :: Mood -> Mood
-- changeMood Mood = Woot
-- changeMood _ = Blah
changeMood val
| val == Blah = Woot
| val == Woot = Blah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment