Open
Description
Hi @antonmedv
Golang 1.23 will support the iter package and define the type Seq[V any]
as an iterator. The expr package supports numerous array functions. I believe iterators will be widely used in many libraries in the future. Is there any plan for these array functions to support not only arrays but also iterators in version 1.23?
Use slice.Values as example
// Values is slices.Values inject by expr.Func
let v = Values([1, 2, 3]);
any(Values, { # > 1}) // [2, 3]
I understand this example is quite simple and not necessary (because we can directly use the array in any). However, please imagine that the iterator might not be iterating over an array.
Reference
https://tip.golang.org/doc/go1.23
https://pkg.go.dev/iter@master