Вопрос

What are some clever uses for infinite generators? I've seen lots of seemingly trivial examples like "list all even numbers", but I assume there must be others that have more applicability to real-world scenarios. Concrete examples (in any language that support generators) appreciated!

I'll give a trivial sample as an answer.

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top