Iterators in Go are a neat way to write “lazy loops”, where we never generate more results than we actually use. Let’s see what that would look like in Go programs, and what new facilities it gives us in the standard library.
All tagged iterator
Iterators in Go are a neat way to write “lazy loops”, where we never generate more results than we actually use. Let’s see what that would look like in Go programs, and what new facilities it gives us in the standard library.