In computer science, a
generator is a special routine that can be used to control the iteration behaviour of a loop. In fact, all
generators are iterators. A
generator is very similar to a
function that returns an array, in that a
generator has parameters, can be called, and generates a sequence of values.
read more >>