-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rename filename and add All method for iter
- Loading branch information
Showing
5 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//go:build go1.23 | ||
|
||
package sets | ||
|
||
import ( | ||
"iter" | ||
) | ||
|
||
// Values iterator over sequences of individual values. | ||
// | ||
// Deprecated: use All instead. | ||
func (s Set[T]) Values() iter.Seq[T] { return s.All() } | ||
|
||
// All iterator over sequences of individual values. | ||
func (s Set[T]) All() iter.Seq[T] { | ||
return func(yield func(T) bool) { | ||
for k := range s { | ||
if !yield(k) { | ||
return | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.