Versions in this module Expand all Collapse all v2 v2.0.1 Oct 19, 2024 Changes in this version + func Aggregate[E, A, F any](s Stream[E], identity A, accumulate Accumulator[A, E], finish Finisher[A, F]) F + func AllMatch[E any](s Stream[E], p Predicate[E]) (allMatch bool) + func AnyMatch[E any](s Stream[E], p Predicate[E]) (anyMatch bool) + func Average[E constraint.RealNumber](s Stream[E]) float64 + func CollectChannelAsyncCtx[E any](ctx context.Context, s Stream[E], buf int) <-chan E + func CollectChannelAsync[E any](s Stream[E], buf int) <-chan E + func CollectChannelCtx[E any](ctx context.Context, s Stream[E], ch chan<- E) + func CollectChannel[E any](s Stream[E], ch chan<- E) + func CollectMap[K comparable, V any](s Stream[pair.Pair[K, V]]) map[K]V + func CollectSlice[E any](s Stream[E]) []E + func ContainsAllBy[E any](s Stream[E], compare cmp.Comparer[E], es ...E) bool + func ContainsAll[E comparable](s Stream[E], es ...E) bool + func ContainsAnyBy[E any](s Stream[E], compare cmp.Comparer[E], es ...E) bool + func ContainsAny[E comparable](s Stream[E], es ...E) bool + func ContainsBy[E any](s Stream[E], compare cmp.Comparer[E], e E) bool + func ContainsNoneBy[E any](s Stream[E], compare cmp.Comparer[E], es ...E) bool + func ContainsNone[E comparable](s Stream[E], es ...E) bool + func Contains[E comparable](s Stream[E], e E) bool + func Count[E any](s Stream[E]) (count int64) + func DebugString[E any](s Stream[E]) string + func ExactlySameBy[E any](s1, s2 Stream[E], compare cmp.Comparer[E]) bool + func ExactlySame[E comparable](s1, s2 Stream[E]) bool + func First[E any](s Stream[E]) (first opt.Optional[E]) + func ForEach[E any](s Stream[E], yield func(E)) + func IndexOfFirstMatch[E any](s Stream[E], p Predicate[E]) opt.Optional[int64] + func IndexOfLastMatch[E any](s Stream[E], p Predicate[E]) opt.Optional[int64] + func IsEmpty[E any](s Stream[E]) (empty bool) + func Last[E any](s Stream[E]) (last opt.Optional[E]) + func MaxBy[E any](s Stream[E], compare cmp.Comparer[E]) (max opt.Optional[E]) + func Max[E constraint.Ordered](s Stream[E]) (max opt.Optional[E]) + func MinBy[E any](s Stream[E], compare cmp.Comparer[E]) (min opt.Optional[E]) + func Min[E constraint.Ordered](s Stream[E]) (min opt.Optional[E]) + func NoneMatch[E any](s Stream[E], p Predicate[E]) bool + func Reduce[E any](s Stream[E], reduce Reducer[E]) opt.Optional[E] + func SetEqualBy[E any](s1, s2 Stream[E], compare cmp.Comparer[E]) bool + func SetEqual[E comparable](s1, s2 Stream[E]) bool + func StringJoin(s Stream[string], sep string) string + func SubsetBy[E any](s1, s2 Stream[E], compare cmp.Comparer[E]) bool + func Subset[E comparable](s1, s2 Stream[E]) bool + func SumComplex[R, E constraint.Complex](s Stream[E]) R + func Sum[R, E constraint.RealNumber](s Stream[E]) R + func SupersetBy[E any](s1, s2 Stream[E], compare cmp.Comparer[E]) bool + func Superset[E comparable](s1, s2 Stream[E]) bool + func ToIterSeq2[K, V any](s Stream[pair.Pair[K, V]]) iter.Seq2[K, V] + func ToIterSeq[E any](s Stream[E]) iter.Seq[E] + type Accumulator func(a A, e E) (result A) + type Combiner func(E1, E2) F + type Consumer func(yield E) (cont bool) + type Finisher func(a A) (result F) + type Generator func() E + type Mapper func(from E) (to F) + type OptionalCombiner func(E1, E2) opt.Optional[F] + type OptionalMapper func(from E) opt.Optional[F] + type Predicate func(e E) (pass bool) + type Reducer func(e1, e2 E) (result E) + type SliceMapper func(from E) (to []F) + type Stream func(c Consumer[E]) + func AggregateByKey[K comparable, V, A, F any](s Stream[pair.Pair[K, V]], identity A, accumulate Accumulator[A, V], ...) Stream[pair.Pair[K, F]] + func AggregateBySortedKey[K any, V, A, F any](s Stream[pair.Pair[K, V]], keyCompare cmp.Comparer[K], identity A, ...) Stream[pair.Pair[K, F]] + func Cache[E any](s Stream[E]) Stream[E] + func CombineOrDiscard[E1, E2, F any](s1 Stream[E1], s2 Stream[E2], combine OptionalCombiner[E1, E2, F]) Stream[F] + func Combine[E1, E2, F any](s1 Stream[E1], s2 Stream[E2], combine Combiner[E1, E2, F]) Stream[F] + func CountByKey[K comparable, V any](s Stream[pair.Pair[K, V]]) Stream[pair.Pair[K, int64]] + func CountBySortedKey[K any, V any](s Stream[pair.Pair[K, V]], keyCompare cmp.Comparer[K]) Stream[pair.Pair[K, int64]] + func CountBySortedValue[V any](s Stream[V], valueCompare cmp.Comparer[V]) Stream[pair.Pair[V, int64]] + func CountByValue[V comparable](s Stream[V]) Stream[pair.Pair[V, int64]] + func DifferenceBy[E any](s1, s2 Stream[E], compare cmp.Comparer[E]) Stream[E] + func Difference[E comparable](s1, s2 Stream[E]) Stream[E] + func DistinctBy[E any](s Stream[E], compare cmp.Comparer[E]) Stream[E] + func Distinct[E comparable](s Stream[E]) Stream[E] + func Empty[E any]() Stream[E] + func FilterIndexed[E any](s Stream[E], p func(E) bool) Stream[pair.Pair[int64, E]] + func Filter[E any](s Stream[E], p Predicate[E]) Stream[E] + func FlatMapSlice[E, F any](s Stream[E], m SliceMapper[E, F]) Stream[F] + func FlatMap[E, F any](s Stream[E], m StreamMapper[E, F]) Stream[F] + func FromChannelCtx[E any](ctx context.Context, ch <-chan E) Stream[E] + func FromChannel[E any](ch <-chan E) Stream[E] + func FromIterSeq2[K, V any](seq iter.Seq2[K, V]) Stream[pair.Pair[K, V]] + func FromIterSeq[E any](seq iter.Seq[E]) Stream[E] + func FromMapKeys[K comparable, V any](m map[K]V) Stream[K] + func FromMapValues[K comparable, V any](m map[K]V) Stream[V] + func FromMap[K comparable, V any](m map[K]V) Stream[pair.Pair[K, V]] + func FromSliceBackwards[E any](s []E) Stream[E] + func FromSliceWithIndexBackwards[E any](s []E) Stream[pair.Pair[int, E]] + func FromSliceWithIndex[E any](s []E) Stream[pair.Pair[int, E]] + func FromSlice[E any](s []E) Stream[E] + func Generate[E any](next Generator[E]) Stream[E] + func GroupByKey[K comparable, V any](s Stream[pair.Pair[K, V]]) Stream[pair.Pair[K, []V]] + func GroupBySortedKey[K any, V any](s Stream[pair.Pair[K, V]], keyCompare cmp.Comparer[K]) Stream[pair.Pair[K, []V]] + func IndexOfMatches[E any](s Stream[E], p Predicate[E]) Stream[int64] + func IntersectionAllBy[E any](compare cmp.Comparer[E], ss ...Stream[E]) Stream[E] + func IntersectionAll[E comparable](ss ...Stream[E]) Stream[E] + func IntersectionBy[E any](s1, s2 Stream[E], compare cmp.Comparer[E]) Stream[E] + func Intersection[E comparable](s1, s2 Stream[E]) Stream[E] + func Interval[N constraint.RealNumber](start, end, step N) Stream[N] + func Limit[E any](s Stream[E], n int64) Stream[E] + func MapOrDiscard[E, F any](s Stream[E], m OptionalMapper[E, F]) Stream[F] + func Map[E, F any](s Stream[E], m Mapper[E, F]) Stream[F] + func MaxByKey[K comparable, V constraint.Ordered](s Stream[pair.Pair[K, V]]) Stream[pair.Pair[K, V]] + func MaxBySortedKey[K any, V constraint.Ordered](s Stream[pair.Pair[K, V]], keyCompare cmp.Comparer[K]) Stream[pair.Pair[K, V]] + func MinByKey[K comparable, V constraint.Ordered](s Stream[pair.Pair[K, V]]) Stream[pair.Pair[K, V]] + func MinBySortedKey[K any, V constraint.Ordered](s Stream[pair.Pair[K, V]], keyCompare cmp.Comparer[K]) Stream[pair.Pair[K, V]] + func Of[E any](e ...E) Stream[E] + func Pad[E any](s Stream[E], pad E, length int) Stream[E] + func Peek[E any](s Stream[E], peek func(e E)) Stream[E] + func RandomBool(source rand.Source) Stream[bool] + func RandomBytes(source rand.Source) Stream[byte] + func RandomExpFloat64(source rand.Source) Stream[float64] + func RandomFloat32(source rand.Source) Stream[float32] + func RandomFloat64(source rand.Source) Stream[float64] + func RandomInt(source rand.Source) Stream[int] + func RandomIntn(source rand.Source, n int) Stream[int] + func RandomNormFloat64(source rand.Source) Stream[float64] + func RandomUint32(source rand.Source) Stream[uint32] + func RandomUint64(source rand.Source) Stream[uint64] + func ReduceByKey[K comparable, V any](s Stream[pair.Pair[K, V]], reduce Reducer[V]) Stream[pair.Pair[K, V]] + func ReduceBySortedKey[K any, V any](s Stream[pair.Pair[K, V]], keyCompare cmp.Comparer[K], reduce Reducer[V]) Stream[pair.Pair[K, V]] + func RepeatN[E any](e E, n int64) Stream[E] + func Repeat[E any](e E) Stream[E] + func Skip[E any](s Stream[E], n int64) Stream[E] + func Slice[E any](s Stream[E], start, end int64) Stream[E] + func SortAsc[E constraint.Ordered](s Stream[E]) Stream[E] + func SortBy[E any](s Stream[E], compare cmp.Comparer[E]) Stream[E] + func SortDesc[E constraint.Ordered](s Stream[E]) Stream[E] + func SortKeyAsc[K constraint.Ordered, V any](s Stream[pair.Pair[K, V]]) Stream[pair.Pair[K, V]] + func SortKeyBy[K any, V any](s Stream[pair.Pair[K, V]], compare cmp.Comparer[K]) Stream[pair.Pair[K, V]] + func SortKeyDesc[K constraint.Ordered, V any](s Stream[pair.Pair[K, V]]) Stream[pair.Pair[K, V]] + func SortValueAsc[K any, V constraint.Ordered](s Stream[pair.Pair[K, V]]) Stream[pair.Pair[K, V]] + func SortValueBy[K any, V any](s Stream[pair.Pair[K, V]], compare cmp.Comparer[V]) Stream[pair.Pair[K, V]] + func SortValueDesc[K any, V constraint.Ordered](s Stream[pair.Pair[K, V]]) Stream[pair.Pair[K, V]] + func SumByKey[K comparable, V constraint.Numeric](s Stream[pair.Pair[K, V]]) Stream[pair.Pair[K, V]] + func SumBySortedKey[K any, V constraint.Numeric](s Stream[pair.Pair[K, V]], keyCompare cmp.Comparer[K]) Stream[pair.Pair[K, V]] + func SymmetricDifferenceBy[E any](s1, s2 Stream[E], compare cmp.Comparer[E]) Stream[E] + func SymmetricDifference[E comparable](s1, s2 Stream[E]) Stream[E] + func Truncate[E any](s Stream[E], length int, tail E) Stream[E] + func Union[E any](ss ...Stream[E]) Stream[E] + func UnzipFirst[E, F any](s Stream[pair.Pair[E, F]]) Stream[E] + func UnzipSecond[E, F any](s Stream[pair.Pair[E, F]]) Stream[F] + func Walk[E any](start E, cond Predicate[E], advance Mapper[E, E]) Stream[E] + func ZipWithIndex[E any, I constraint.Integer](s Stream[E], offset I) Stream[pair.Pair[E, I]] + func Zip[E, F any](s1 Stream[E], s2 Stream[F]) Stream[pair.Pair[E, F]] + type StreamMapper func(from E) (to Stream[F]) Other modules containing this package github.com/jpfourny/papaya