Had a go (heh) at making a Go iterator. It was simpler than I expected, once I got my head around how they work. It’s a push model, the iterator pushes value to a yield function, which sends it to range, and receives a flag on whether to continue. The package docs do a good job explaining this.