Quick actions

cmd+k|ctrl+k

Navigation

Languages

Primes

Snippet info

Language

Haskell

Visibility

public

Author

atmantree

Created

2018-09-25T01:14:19Z

Updated

2018-09-25T01:25:29Z

primes = filterPrime [2..]
  where filterPrime (p:xs) = 
           p : filterPrime [x | x <- xs, x `mod` p /= 0 ]

main = print $ (!!) primes 5000
INFO