We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1033172 commit 1b07b77Copy full SHA for 1b07b77
doc/next/2-language.md
@@ -1,3 +1,13 @@
1
## Changes to the language {#language}
2
3
+<!-- go.dev/issue/61405, CL 557835, CL 584596 -->
4
+Go 1.23 makes the (Go 1.22) ["range-over-func" experiment](https://tip.golang.org/wiki/RangefuncExperiment) a part of the language.
5
+The "range" clause in a "for-range" loop now accepts iterator functions of the following types
6
7
+ func(func() bool)
8
+ func(func(K) bool)
9
+ func(func(K, V) bool)
10
+
11
+ as range expressions.
12
+ Calls of the iterator argument function produce the iteration values for the "for-range" loop.
13
+ For details see the [language spec](https://tip.golang.org/ref/spec#For_statements).
0 commit comments