Hacker News with Generative AI: Iterators

Fun with Go Iterators (xnacly.me)
Go version 1.23 added iterator support 1 and the iter package 2. We can now loop over constants, containers (maps, slices, arrays, strings) and functions. At first I found the iterator creation clunky, while consuming the iterator seems straightforward.
Creating an empty iterator of a certain type in Rust (2018) (freedomlayer.org)
Coroutines in Go: Runtime Implementation and Iterators (unskilled.blog)
Go range iterators demystified (dolthub.com)