Problem 10 in Project Euler. I saw some discussion there but only for C.
I used the following code to calculate:
print . sum . sieve $ [2..2000000] where
sieve [] = []
sieve (x:xs) = x : sieve (filter ((/= 0) . (`mod` x)) xs)
It takes ages to calculate. I am wondering if there is any more efficient way to calculate it?