Correct Problem3.hs to use the new type for `primes`.

This commit is contained in:
jdmcdona 2015-08-07 17:11:54 -05:00
parent f5c67f891c
commit f8d2bb4a48
1 changed files with 1 additions and 1 deletions

View File

@ -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