Skip to content

Instantly share code, notes, and snippets.

@elderica
Created December 10, 2011 09:27
Show Gist options
  • Save elderica/1454871 to your computer and use it in GitHub Desktop.
Save elderica/1454871 to your computer and use it in GitHub Desktop.
main = print $ sum' [1..10000000000000]
sum' xs = foldl' (+) 0 xs
foldl' _ x [] = x
foldl' op x (y:ys) = let !z = x `op` y in foldl' op z ys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment