File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,6 @@ import (
6
6
"iter"
7
7
)
8
8
9
- // Values iterator over sequences of individual values.
10
- //
11
- // Deprecated: use All instead.
12
- func (s Set [T ]) Values () iter.Seq [T ] { return s .All () }
13
-
14
9
// All iterator over sequences of individual values.
15
10
func (s Set [T ]) All () iter.Seq [T ] {
16
11
return func (yield func (T ) bool ) {
Original file line number Diff line number Diff line change @@ -124,15 +124,22 @@ func (s Set[T]) Clone() Set[T] {
124
124
return NewFrom (s )
125
125
}
126
126
127
- // List returns the contents as a sorted slice .
128
- func (s Set [T ]) List () []T {
127
+ // Values returns the value of the sets .
128
+ func (s Set [T ]) Values () []T {
129
129
res := make ([]T , 0 , len (s ))
130
130
for key := range s {
131
131
res = append (res , key )
132
132
}
133
133
return res
134
134
}
135
135
136
+ // List returns the value of the sets.
137
+ //
138
+ // Deprecated: use Values instead.
139
+ func (s Set [T ]) List () []T {
140
+ return s .Values ()
141
+ }
142
+
136
143
// Each traverses the items in the Set, calling the provided function for each
137
144
// set member. Traversal will continue until all items in the Set have been
138
145
// visited, or if the closure returns false.
You can’t perform that action at this time.
0 commit comments