Defining class Sieve
The constructor is easy:
Sieve::Sieve():
Conduit(new Counter(2)) { }
But what about the next function?
It calls source()->next(), which yields the next prime
Then it has to splice in a new Filter
Previous slide
Next slide
Back to first slide
View graphic version