Skip to content

Instantly share code, notes, and snippets.

@paul
Created February 6, 2011 00:09
Show Gist options
  • Save paul/812948 to your computer and use it in GitHub Desktop.
Save paul/812948 to your computer and use it in GitHub Desktop.
module Main where
sumOfMultiples :: [Integer] -> Integer
sumOfMultiples (n) = sum [x | x <- n, x `mod` 3 == 0 || x `mod` 5 == 0]
main = print $ sumOfMultiples [1..999]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment