diff --git a/Problem3.hs b/Problem3.hs index ea62c65..7b78574 100644 --- a/Problem3.hs +++ b/Problem3.hs @@ -1,7 +1,7 @@ -- What is the largest prime factor of the number 600851475143 ? import Euler -factors n = go (primes ()) n +factors n = go primes n where go (p:ps) n | n < p = [] | n `mod` p == 0 = p : go (p:ps) (n `div` p) | otherwise = go ps n