[Haskell-cafe] Re: Simple FAST lazy functional primes

Will Ness will_n48 at yahoo.com
Mon Nov 2 10:54:28 EST 2009


Will Ness <will_n48 <at> yahoo.com> writes:

> But more importantly I want it to be known that there's a lot that can be done
> here, in a natural functional lazy kind of way, before resorting to priority
> queues and mutable arrays. We could always just use C too. ;)

I mean it as an introductory code that's nevertheless good for producing the
first million primes or so - not the best sieve ever, but the best (is it?)
simple clear functional introductory sieve, instead. That's another reason to
using (take k primes') - it practically says it in English, "the first k odd
primes".

:)





More information about the Haskell-Cafe mailing list