Skip to content

Instantly share code, notes, and snippets.

@kaveet
Created November 26, 2016 18:47
Show Gist options
  • Save kaveet/00570b553d52aeedaeb0f23a6bdd51cd to your computer and use it in GitHub Desktop.
Save kaveet/00570b553d52aeedaeb0f23a6bdd51cd to your computer and use it in GitHub Desktop.
Haskell sum implementation
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