Skip to content

Instantly share code, notes, and snippets.

@wavebeem
Created January 21, 2011 20:10
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 wavebeem/790320 to your computer and use it in GitHub Desktop.
Save wavebeem/790320 to your computer and use it in GitHub Desktop.
a [] = 0
a (x:xs) = x + a xs
b xs = b' 0 xs
where
b' a [] = 0
b' a (x:xs) = b' (a+x) xs
c xs = foldl (+) 0 xs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment