mirror of https://github.com/tinygo-org/tinygo.git
Ayke van Laethem
3 months ago
committed by
Ron Evans
6 changed files with 37 additions and 2 deletions
@ -0,0 +1,3 @@ |
|||
module github.com/tinygo-org/tinygo/testdata/go1.23 |
|||
|
|||
go 1.23 |
@ -0,0 +1,18 @@ |
|||
package main |
|||
|
|||
func main() { |
|||
testFuncRange(counter) |
|||
} |
|||
|
|||
func testFuncRange(f func(yield func(int) bool)) { |
|||
for i := range f { |
|||
println(i) |
|||
} |
|||
println("go1.23 has lift-off!") |
|||
} |
|||
|
|||
func counter(yield func(int) bool) { |
|||
for i := 10; i >= 1; i-- { |
|||
yield(i) |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
10 |
|||
9 |
|||
8 |
|||
7 |
|||
6 |
|||
5 |
|||
4 |
|||
3 |
|||
2 |
|||
1 |
|||
go1.23 has lift-off! |
Loading…
Reference in new issue