Skip to content

Glossary: Go in Practice

yield

Also written: yield function

The function an iterator calls to hand the loop each value. It runs the loop body once and returns `false` after a `break`, and the iterator must then return at once.

Where the book teaches it

Related terms

Iteratoriter.Seq[V]; iter.Seq2[K, V]