Created
March 29, 2012 15:45
-
-
Save davorb/2238768 to your computer and use it in GitHub Desktop.
project euler 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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