Generators: Iterators the Modern Way
A hand-written iterator is a bookmark and a page of bookkeeping; a generator writes the same iterator as an ordinary loop that hands out each item with yield, pausing until the next one is asked for, so stops can even be fetched from a server only when they're needed.
Updated

- Category
- Data Structures
- Level
- Journeyman
- Tags
- c-sharp, Generator, Generator Function, Iterator Pattern, JavaScript, OOP, python, Yield Return