File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ package reflect
6
6
7
7
import "iter"
8
8
9
- // Seq returns an iter.Seq[reflect. Value] that loops over the elements of v.
9
+ // Seq returns an iter.Seq[Value] that loops over the elements of v.
10
10
// If v's kind is Func, it must be a function that has no results and
11
11
// that takes a single argument of type func(T) bool for some type T.
12
12
// If v's kind is Pointer, the pointer element type must have kind Array.
@@ -87,7 +87,11 @@ func (v Value) Seq() iter.Seq[Value] {
87
87
panic ("reflect: " + v .Type ().String () + " cannot produce iter.Seq[Value]" )
88
88
}
89
89
90
- // Seq2 is like Seq but for two values.
90
+ // Seq2 returns an iter.Seq2[Value, Value] that loops over the elements of v.
91
+ // If v's kind is Func, it must be a function that has no results and
92
+ // that takes a single argument of type func(K, V) bool for some type K, V.
93
+ // If v's kind is Pointer, the pointer element type must have kind Array.
94
+ // Otherwise v's kind must be Array, Map, Slice, or String.
91
95
func (v Value ) Seq2 () iter.Seq2 [Value , Value ] {
92
96
if canRangeFunc2 (v .typ ()) {
93
97
return func (yield func (Value , Value ) bool ) {
You can’t perform that action at this time.
0 commit comments