[plt-scheme] The place of streams?

From: Grant Rettke (grettke at acm.org)
Date: Thu Jun 21 18:11:30 EDT 2007

Thanks guys!

On 6/21/07, Danny Yoo <dyoo at cs.wpi.edu> wrote:
>
>
> > I wrote a function that iterates through a list prime numbers until a
> > predicate reports true.
> >
> > My first attempt involves generating the prime list up front, which
> > takes a lot of time.
>
> Hi Grant,
>
> There's a section in "Structure and Interpretation of Computer Programs"
> that explicitely uses this example.  You might want to take a peek at:
>
> http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-24.html#call_footnote_Temp_443
>
> Later on in that chapter, they'll repeat this stream of primes example
> with a nifty stream version of the "sieve of Eratosthenes".
>
>
> > It sounds like a stream could be used here, and I wouldn't need to
> > rewrite my function.
>
> I think the only thing that might need a change is the use of FIRST/REST
> with the equivalent operations for streams.
>


Posted on the users mailing list.