Skip to content

Instantly share code, notes, and snippets.

@dbyrne
Created March 23, 2011 04:44
Show Gist options
  • Save dbyrne/882630 to your computer and use it in GitHub Desktop.
Save dbyrne/882630 to your computer and use it in GitHub Desktop.
Project Euler #1 - Haskell
multiples :: [Int] -> [Int]
multiples = filter (\x -> (mod x 3) == 0 || (mod x 5) == 0)
main = putStrLn $ (show . sum . multiples) [3..999]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment