Play audio slide show -- Keyboard shortcut: 'x'  Lecture overview -- Keyboard shortcut: 'u'  Previous page: Stream example: The sieve of Eratosthenes -- Keyboard shortcut: 'p'    Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home      The Order of Evaluation - slide 26 : 26

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.