Skip to main content

A generator is a generalization of a subroutine, primarily used to simplify the writing of iterators. The yield statement in a generator does not specify a co-routine to jump to, but rather passes a value back to a parent routine.

There is no tag wiki for this tag … yet!

Tag wikis help introduce newcomers to the tag. They contain an overview of the topic defined by the tag, along with guidelines on its usage.

All registered users may propose new tag wikis.

(Note that if you have less than 20000 reputation, your tag wiki will be peer reviewed before it is published.)