Skip to content

Instantly share code, notes, and snippets.

@AndrewRademacher
Last active August 29, 2015 14:05
Show Gist options
  • Save AndrewRademacher/246557b0f76ced85ec7c to your computer and use it in GitHub Desktop.
Save AndrewRademacher/246557b0f76ced85ec7c to your computer and use it in GitHub Desktop.
A purely functional lookup to help you determine what to do when it's hot, based on your sitch. Based on esteemed work from Coty Beasley and Chad Elliot.
module WhenToDropIt
( Sitch (..)
, whatDoIDo
) where
data Sitch = Pigs | Pimps | NgAttitude
suffix :: String
suffix = " like it's hot." ++
"\nI got the rolly on my arm and I'm puring Chandon."
whatDoIDo :: Sitch -> String
whatDoIDo Pigs = "Park it" ++ suffix
whatDoIDo Pimps = "Drop it" ++ suffix
whatDoIDo NgAttitude = "Pop it" ++ suffix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment