Versions in this module Expand all Collapse all v1 v1.5.1 Feb 15, 2026 Changes in this version + var ErrStreamClosed = errors.New("stream is closed") + type Source interface + Close func() error + Next func(ctx context.Context) (T, bool, error) + type Stream interface + AllMatch func(ctx context.Context, predicate func(T) bool) (bool, error) + AnyMatch func(ctx context.Context, predicate func(T) bool) (bool, error) + Close func() error + Collect func(ctx context.Context, supplier func() interface{}, ...) (interface{}, error) + Count func(ctx context.Context) (int64, error) + Distinct func() Stream[T] + Filter func(predicate func(T) bool) Stream[T] + FindAny func(ctx context.Context) (T, bool, error) + FindFirst func(ctx context.Context) (T, bool, error) + FlatMap func(mapper func(T) Stream[T]) Stream[T] + ForEach func(ctx context.Context, action func(T)) error + IsClosed func() bool + Limit func(maxSize int64) Stream[T] + Map func(mapper func(T) T) Stream[T] + MapTo func(mapper func(T) interface{}) Stream[interface{}] + Max func(ctx context.Context, compare func(a, b T) int) (T, bool, error) + Min func(ctx context.Context, compare func(a, b T) int) (T, bool, error) + NoneMatch func(ctx context.Context, predicate func(T) bool) (bool, error) + Peek func(action func(T)) Stream[T] + Reduce func(ctx context.Context, identity T, accumulator func(T, T) T) (T, error) + Skip func(n int64) Stream[T] + Sorted func(compare func(a, b T) int) Stream[T] + ToSlice func(ctx context.Context) ([]T, error) + func Empty[T any]() Stream[T] + func FromChannel[T any](ch <-chan T) Stream[T] + func FromSlice[T any](slice []T) Stream[T] + func Generate[T any](generator func() T) Stream[T] + func New[T any](source Source[T]) Stream[T]