Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Of course, Haskell has built-in support for lazy streams and the recursive definition of functions (like filterprime) using pattern matching all supported by an aggressive optimizing compiler.  Your task is to extend the provided code to support a static final field called primes in the top-level interface IntStream bound to the lazy infinite stream of primes (ignoring the fact that int arithmetic will overflow when numbers get too large.  You also need to write a JUnit test file (compatible with JUnit 4 as provided by DrJava) called IntStreamTest to test your code.  You may assume that all of the provided code is correct; you do not need to test the interface that it supports.

If I make any enhancements to the support code file primeSieve.java, I will post messages to that effect to Piazza.