Journal of Functional Programming

Articles

The Genuine Sieve of Eratosthenes

MELISSA E. O'NEILLa1

a1 Harvey Mudd College, Claremont, CA, U.S.A (e-mail: oneill@acm.org)

Abstract

A much beloved and widely used example showing the elegance and simplicity of lazy functional programming represents itself as “The Sieve of Eratosthenes.” This paper shows that this example is not the sieve and presents an implementation that actually is.