Preview: ranging over functions in Go
Open link in next tab
Preview: ranging over functions in Go - Eli Bendersky's website
https://eli.thegreenplace.net/2023/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.