Preview: ranging over functions in Go
A major Go language change proposal was published earlier this week: add range over int, range over func, and there's a good chance this change will make it into a future Go release. In this post I will discuss the motivation for this proposal, how it's going to work, and provide some examples of how Go code using it would look.https://eli.thegreenplace.net/2023/preview-ranging-over-functions-in-go
Update 2023.07.24: the proposal keeps evolving, and some details will likely change. This post still serves as a good introduction to the topic, and I will update it (or add another post) when the proposal settles to the final syntax and semantics.