Skip to content

Instantly share code, notes, and snippets.

@cmoore
Created June 18, 2009 03:43
Show Gist options
  • Save cmoore/131684 to your computer and use it in GitHub Desktop.
Save cmoore/131684 to your computer and use it in GitHub Desktop.
problem_six =
let sum_of_squares = sum $ map (\x -> x * x ) [1..100]
sum_of_numbers = sum [1..100]
in
( sum_of_numbers * sum_of_numbers ) - sum_of_squares
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment