4 ms·
Yes, it's lazy. The sieve outputs on a channel, which blocks until you read it. It will only generate more numbers as they're consumed. Same thing with the f
by dadkins 17y ago
Yes, it's lazy. The sieve outputs on a channel, which blocks until you read it. It will only generate more numbers as they're consumed. Same thing with the filters.
- grogers 17y agoThis is because the default 'make(chan int)' creates a synchronous channel