Iterators in Go

John Arundel · 2024

The latest iteration of Go looks interesting A Golang iterator is a function that "yields" one result at a time, instead of computing a whole set of results and returning them all at once. When you write a for loop where the range expression is an iterator, the loop will be executed once for each value returned by the iterator. That sounds complicated, but it's actually very simple.

Read the paper · More papers on PaperTik