Skip to content

Commit

Permalink
Fix wording of Filter iterator docstring
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pippolo84 authored and joamaki committed Apr 3, 2024
1 parent 7319e92 commit 351ad8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 351ad8c

Please sign in to comment.