We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
see: golang/go#69345
The text was updated successfully, but these errors were encountered:
//go:build go1.23 package main import "fmt" func SliceElemPointers[E any](s []E) func(func(*E) bool) { return func(yield func(*E) bool) { for i := range s { if !yield(&s[i]) { break } } } } func main() { var x = []int{1, 3, 6} for p := range SliceElemPointers(x) { *p *= 2 } fmt.Println(x) // [2 6 12] }
Sorry, something went wrong.
No branches or pull requests
see: golang/go#69345
The text was updated successfully, but these errors were encountered: