Created
November 26, 2016 18:47
-
-
Save kaveet/00570b553d52aeedaeb0f23a6bdd51cd to your computer and use it in GitHub Desktop.
Haskell sum implementation
This file contains 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
module MySum where | |
sum :: [Int] -> Int | |
sum [] = 0 | |
sum (x:xs) = x + sum xs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment