euler/haskell/euler001.hs

7 lines
141 B
Haskell

module Main where
divisible_by_3_or_5 x = (mod x 3 == 0) || (mod x 5 == 0)
main = do
print (sum (filter divisible_by_3_or_5 [1..999]))