From 351ad8caf4822dc9c1c4fbc85528f59788376b46 Mon Sep 17 00:00:00 2001 From: Fabio Falzoi Date: Tue, 2 Apr 2024 18:38:13 +0200 Subject: [PATCH] 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 --- iterator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iterator.go b/iterator.go index 2494256..db4617e 100644 --- a/iterator.go +++ b/iterator.go @@ -76,7 +76,7 @@ func (it *mapIterator[In, Out]) Next() (out Out, revision Revision, ok bool) { return } -// Filter skips objects for which the supplied predicate returns true +// Filter includes objects for which the supplied predicate returns true func Filter[Obj any, It Iterator[Obj]](iter It, pred func(Obj) bool) Iterator[Obj] { return &filterIterator[Obj]{ iter: iter,