Skip to content

Instantly share code, notes, and snippets.

@davorb
Created March 29, 2012 15:45
Show Gist options
  • Save davorb/2238768 to your computer and use it in GitHub Desktop.
Save davorb/2238768 to your computer and use it in GitHub Desktop.
project euler 1
-- the sum of all the multiples of 3 or 5 below 1000
numbers = [x | x <- [1..], x `mod` 3 == 0 || x `mod` 5 == 0]
answer = sum $ takeWhile (<1000) numbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment