you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

mrowww love me some code in the comments

data Emotion = Happy | Sad

vivvyEmotion :: Emotion
vivvyEmotion = Sad

miishaPosts :: Emotion -> Emotion
miishaPosts Sad = Happy
miishaPosts Happy = Happy

currentEmotion :: Emotion
currentEmotion = miishaPosts vivvyEmotion

— currentEmotion will 
— always equal Happy 
— because of miishaPosts
  • source
  • parent
  • hideshow 2 child comments