Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- source: https://wiki.haskell.org/Fold
- primes :: (Integral a) => [a]
- primes = 2 : 3 : ([5,7..] `minus`
- foldi (\(x:xs) -> (x:) . union xs) []
- [[p*p, p*p+2*p..] | p <- tail primes])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement