Lecture overview -- Keyboard shortcut: 'u'  Previous page: Stream example: The Sieve of Eratosthenes -- Keyboard shortcut: 'p'  Next page: Exercises -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Evaluation Order and Infinite Lists - slide 26 : 27

Applications of The sieve of Eratosthenes
The sieve process produces the stream of all prime numbers
Expression

Value

(define primes 
  (sieve 
    (integers-starting-from 2)))

(stream-section 25 primes)
(2 3 5 7 11 13 17 19 23 29 31 37 41 
 43 47 53 59 61 67 71 73 79 83 89 97)
sieve.scm
All the functions necessary to use the Sieve of Eratosthenes.