Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The very first example I see, the infinite sequence of primes, seems to indicate it is Eratosthenes' Sieve, but it is not. http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf

In fact, the correct implementation, with some discussion of the bad performance characteristics of the example on the front page, is in your own wiki: http://www.haskell.org/haskellwiki/Prime_numbers#Sieve_of_Er...

Reading further, it looks like it is the correct implementation of "Turner's Sieve", but I don't think (though I may be wrong) that I'm in the minority that sees "prime" and "sieve" and thinks "Eratosthenes".



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: