devxlogo

Introducing Generators

Introducing Generators

A generator is a function or algorithm returning a series of values upon successive calls. The most common example is a random number generator although generators have many other useful applications. For example, an application that creates temporary files must generate a unique name for each file. To accomplish this, it uses a name generator, which creates a unique name on each invocation. Another example of a generator is a numerator

devx-admin

Share the Post: