more idiomatic 001

master
Evan Hemsley 2020-10-26 23:23:53 -07:00
parent 1d9e341ac3
commit 9763b56dce
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
module Main where
divisible_by_3_or_5 x = (x `mod` 3 == 0) || (x `mod` 5 == 0)
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]))