Skip to content

Instantly share code, notes, and snippets.

@akhileshs
Created April 3, 2015 12:49
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 akhileshs/d31351b45c517e2a7db9 to your computer and use it in GitHub Desktop.
Save akhileshs/d31351b45c517e2a7db9 to your computer and use it in GitHub Desktop.
addThree :: Int -> Int -> Int -> Int
addThree x y z = x + y + z
factorial :: Integer -> Integer
factorial n = product [1..n]
lucky :: (Integral a) => a -> String
lucky 9 = "Lucky number nine!"
lucky x = "Sorry, you're out of luck!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment