5 lines
194 B
Haskell
5 lines
194 B
Haskell
|
-- 10 - sum prime smaller 2 million
|
||
|
eres :: Integral a => [a] -> [a]
|
||
|
eres (x:xs) = if x*x < last xs then x:eres (filter (\y -> rem y x /= 0) xs) else (x:xs)
|
||
|
problem_10 = sum $ eres [2..2000000]
|