Skip to content

Commit 098e423

Browse files
committed
Fix wording of Filter iterator docstring
Filter iterator ranges over the objects and skips the ones for which the predicate is not true. The commit fixes the wording of the function docstring that was stating the opposite. Signed-off-by: Fabio Falzoi <[email protected]>
1 parent 7319e92 commit 098e423

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iterator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (it *mapIterator[In, Out]) Next() (out Out, revision Revision, ok bool) {
7676
return
7777
}
7878

79-
// Filter skips objects for which the supplied predicate returns true
79+
// Filter includes objects for which the supplied predicate returns true
8080
func Filter[Obj any, It Iterator[Obj]](iter It, pred func(Obj) bool) Iterator[Obj] {
8181
return &filterIterator[Obj]{
8282
iter: iter,

0 commit comments

Comments
 (0)