Created
September 4, 2015 14:26
-
-
Save seanparsons/4e4692ca01c65413cd88 to your computer and use it in GitHub Desktop.
Function definition example in Haskell.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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