more idiomatic 001
parent
1d9e341ac3
commit
9763b56dce
|
@ -1,6 +1,6 @@
|
||||||
module Main where
|
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
|
main = do
|
||||||
print (sum (filter divisible_by_3_or_5 [1..999]))
|
print (sum (filter divisible_by_3_or_5 [1..999]))
|
||||||
|
|
Loading…
Reference in New Issue