[plt-scheme] The place of streams?

From: Grant Rettke (grettke at acm.org)
Date: Thu Jun 21 00:22:20 EDT 2007

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.

Ideally I would only generate each prime as needed.

It sounds like a stream could be used here, and I wouldn't need to
rewrite my function.

Is this the case?

Any tips?


Posted on the users mailing list.