...

/

Generator Pattern

Generator Pattern

Learn about the generator pattern in Golang.

Overview of the generator pattern

We use a generator pattern to create a sequence of values that we can use to produce an output. A generator is a function that behaves like an iterator. In other words, it’s a function that launches a ...