Skip to content

Instantly share code, notes, and snippets.

@seanparsons
Created September 4, 2015 14:26
Show Gist options
  • Save seanparsons/4e4692ca01c65413cd88 to your computer and use it in GitHub Desktop.
Save seanparsons/4e4692ca01c65413cd88 to your computer and use it in GitHub Desktop.
Function definition example in Haskell.
doubleUs Int -> Int -> Int
doubleUs 0 0 = 0
doubleUs a 0 = a * 2
doubleUs 0 b = b * 2
doubleUs x y = x * 2 + y * 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment