package moreiters
import "golang.org/x/tools/internal/moreiters"
Index ¶
- func Any[T any](seq iter.Seq[T], pred func(T) bool) bool
- func Contains[T comparable](seq iter.Seq[T], x T) bool
- func Every[T any](seq iter.Seq[T], pred func(T) bool) bool
- func First[T any](seq iter.Seq[T]) (z T, ok bool)
Functions ¶
func Any ¶
Any reports whether any pred(t) for t in seq returns true.
func Contains ¶
func Contains[T comparable](seq iter.Seq[T], x T) bool
Contains reports whether x is an element of the sequence seq.
func Every ¶
Every reports whether every pred(t) for t in seq returns true, stopping at the first false element.
func First ¶
First returns the first value of seq and true. If seq is empty, it returns the zero value of T and false.
Source Files ¶
iters.go
- Version
- v0.38.0
- Published
- Oct 8, 2025
- Platform
- darwin/amd64
- Imports
- 1 packages
- Last checked
- 1 hour ago –
Tools for package owners.