Documentation
¶
Index ¶
- func GroupBy[K comparable, V any](vs []V, f func(v V) K) map[K][]V
- type Stream1
- func (s Stream1[T1, T2, T3, T4]) Filter(f func(T1) bool) Stream1[T1, T2, T3, T4]
- func (s Stream1[T1, T2, T3, T4]) ForEach(f func(T1))
- func (s Stream1[T1, T2, T3, T4]) Limit(limit int) Stream1[T1, T2, T3, T4]
- func (s Stream1[T1, T2, T3, T4]) Map(f func(T1) T1) Stream1[T1, T2, T3, T4]
- func (s Stream1[T1, T2, T3, T4]) Map1(f func(T1) T1) Stream1[T1, T2, T3, T4]
- func (s Stream1[T1, T2, T3, T4]) Map2(f func(T1) T2) Stream2[T1, T2, T3, T4]
- func (s Stream1[T1, T2, T3, T4]) Map3(f func(T1) T3) Stream3[T1, T2, T3, T4]
- func (s Stream1[T1, T2, T3, T4]) Map4(f func(T1) T4) Stream4[T1, T2, T3, T4]
- func (s Stream1[T1, T2, T3, T4]) Min(less func(T1, T1) bool) T1
- func (s Stream1[T1, T2, T3, T4]) Reduce(f func(v T1, acc T1, i int) T1, initial T1) T1
- func (s Stream1[T1, T2, T3, T4]) Reduce1(f func(v T1, acc T1, i int) T1, initial T1) T1
- func (s Stream1[T1, T2, T3, T4]) Reduce2(f func(v T1, acc T2, i int) T2, initial T2) T2
- func (s Stream1[T1, T2, T3, T4]) Reduce3(f func(v T1, acc T3, i int) T3, initial T3) T3
- func (s Stream1[T1, T2, T3, T4]) Reduce4(f func(v T1, acc T4, i int) T4, initial T4) T4
- func (s Stream1[T1, T2, T3, T4]) ToList() []T1
- type Stream2
- func (s Stream2[T1, T2, T3, T4]) Filter(f func(T2) bool) Stream2[T1, T2, T3, T4]
- func (s Stream2[T1, T2, T3, T4]) ForEach(f func(T2))
- func (s Stream2[T1, T2, T3, T4]) Limit(limit int) Stream2[T1, T2, T3, T4]
- func (s Stream2[T1, T2, T3, T4]) Map(f func(T2) T2) Stream2[T1, T2, T3, T4]
- func (s Stream2[T1, T2, T3, T4]) Map1(f func(T2) T1) Stream1[T1, T2, T3, T4]
- func (s Stream2[T1, T2, T3, T4]) Map2(f func(T2) T2) Stream2[T1, T2, T3, T4]
- func (s Stream2[T1, T2, T3, T4]) Map3(f func(T2) T3) Stream3[T1, T2, T3, T4]
- func (s Stream2[T1, T2, T3, T4]) Map4(f func(T2) T4) Stream4[T1, T2, T3, T4]
- func (s Stream2[T1, T2, T3, T4]) Min(less func(T2, T2) bool) T2
- func (s Stream2[T1, T2, T3, T4]) Reduce(f func(v T2, acc T2, i int) T2, initial T2) T2
- func (s Stream2[T1, T2, T3, T4]) Reduce1(f func(v T2, acc T1, i int) T1, initial T1) T1
- func (s Stream2[T1, T2, T3, T4]) Reduce2(f func(v T2, acc T2, i int) T2, initial T2) T2
- func (s Stream2[T1, T2, T3, T4]) Reduce3(f func(v T2, acc T3, i int) T3, initial T3) T3
- func (s Stream2[T1, T2, T3, T4]) Reduce4(f func(v T2, acc T4, i int) T4, initial T4) T4
- func (s Stream2[T1, T2, T3, T4]) ToList() []T2
- type Stream3
- func (s Stream3[T1, T2, T3, T4]) Filter(f func(T3) bool) Stream3[T1, T2, T3, T4]
- func (s Stream3[T1, T2, T3, T4]) ForEach(f func(T3))
- func (s Stream3[T1, T2, T3, T4]) Limit(limit int) Stream3[T1, T2, T3, T4]
- func (s Stream3[T1, T2, T3, T4]) Map(f func(T3) T3) Stream3[T1, T2, T3, T4]
- func (s Stream3[T1, T2, T3, T4]) Map1(f func(T3) T1) Stream1[T1, T2, T3, T4]
- func (s Stream3[T1, T2, T3, T4]) Map2(f func(T3) T2) Stream2[T1, T2, T3, T4]
- func (s Stream3[T1, T2, T3, T4]) Map3(f func(T3) T3) Stream3[T1, T2, T3, T4]
- func (s Stream3[T1, T2, T3, T4]) Map4(f func(T3) T4) Stream4[T1, T2, T3, T4]
- func (s Stream3[T1, T2, T3, T4]) Min(less func(T3, T3) bool) T3
- func (s Stream3[T1, T2, T3, T4]) Reduce(f func(v T3, acc T3, i int) T3, initial T3) T3
- func (s Stream3[T1, T2, T3, T4]) Reduce1(f func(v T3, acc T1, i int) T1, initial T1) T1
- func (s Stream3[T1, T2, T3, T4]) Reduce2(f func(v T3, acc T2, i int) T2, initial T2) T2
- func (s Stream3[T1, T2, T3, T4]) Reduce3(f func(v T3, acc T3, i int) T3, initial T3) T3
- func (s Stream3[T1, T2, T3, T4]) Reduce4(f func(v T3, acc T4, i int) T4, initial T4) T4
- func (s Stream3[T1, T2, T3, T4]) ToList() []T3
- type Stream4
- func (s Stream4[T1, T2, T3, T4]) Filter(f func(T4) bool) Stream4[T1, T2, T3, T4]
- func (s Stream4[T1, T2, T3, T4]) ForEach(f func(T4))
- func (s Stream4[T1, T2, T3, T4]) Limit(limit int) Stream4[T1, T2, T3, T4]
- func (s Stream4[T1, T2, T3, T4]) Map(f func(T4) T4) Stream4[T1, T2, T3, T4]
- func (s Stream4[T1, T2, T3, T4]) Map1(f func(T4) T1) Stream1[T1, T2, T3, T4]
- func (s Stream4[T1, T2, T3, T4]) Map2(f func(T4) T2) Stream2[T1, T2, T3, T4]
- func (s Stream4[T1, T2, T3, T4]) Map3(f func(T4) T3) Stream3[T1, T2, T3, T4]
- func (s Stream4[T1, T2, T3, T4]) Map4(f func(T4) T4) Stream4[T1, T2, T3, T4]
- func (s Stream4[T1, T2, T3, T4]) Min(less func(T4, T4) bool) T4
- func (s Stream4[T1, T2, T3, T4]) Reduce(f func(v T4, acc T4, i int) T4, initial T4) T4
- func (s Stream4[T1, T2, T3, T4]) Reduce1(f func(v T4, acc T1, i int) T1, initial T1) T1
- func (s Stream4[T1, T2, T3, T4]) Reduce2(f func(v T4, acc T2, i int) T2, initial T2) T2
- func (s Stream4[T1, T2, T3, T4]) Reduce3(f func(v T4, acc T3, i int) T3, initial T3) T3
- func (s Stream4[T1, T2, T3, T4]) Reduce4(f func(v T4, acc T4, i int) T4, initial T4) T4
- func (s Stream4[T1, T2, T3, T4]) ToList() []T4
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupBy ¶
func GroupBy[K comparable, V any](vs []V, f func(v V) K) map[K][]V
GroupBy grouping elements according to a classification function, and returning the results in a Map
Types ¶
type Stream1 ¶
Stream1 a sequence of elements of type 1
func Slice ¶
Slice returns a sequential Stream supporting 1 type with the specified slice as its source
func Slice2 ¶
Slice2 returns a sequential Stream supporting 2 types with the specified slice as its source
func Slice3 ¶
Slice3 returns a sequential Stream supporting 3 types with the specified slice as its source
func Slice4 ¶
Slice4 returns a sequential Stream supporting 4 types with the specified slice as its source
func (Stream1[T1, T2, T3, T4]) Filter ¶
Filter returns the results of the elements of this slice that match the given predicate
func (Stream1[T1, T2, T3, T4]) ForEach ¶
func (s Stream1[T1, T2, T3, T4]) ForEach(f func(T1))
ForEach performs an action for each element of this slice
func (Stream1[T1, T2, T3, T4]) Limit ¶
Limit returns the results of the elements of this slice, truncated to be no longer than maxSize in length
func (Stream1[T1, T2, T3, T4]) Map ¶
Map returns the results of applying the given function to the elements of this slice
func (Stream1[T1, T2, T3, T4]) Map1 ¶
Map1 returns the results of applying the given function to the elements of this slice
convert result to type 1
func (Stream1[T1, T2, T3, T4]) Map2 ¶
Map2 returns the results of applying the given function to the elements of this slice
convert result to type 2
func (Stream1[T1, T2, T3, T4]) Map3 ¶
Map3 returns the results of applying the given function to the elements of this slice
convert result to type 3
func (Stream1[T1, T2, T3, T4]) Map4 ¶
Map4 returns the results of applying the given function to the elements of this slice
convert result to type 4
func (Stream1[T1, T2, T3, T4]) Min ¶
Min returns the minimum element of this stream according to the provided less function
func (Stream1[T1, T2, T3, T4]) Reduce ¶
Reduce performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
func (Stream1[T1, T2, T3, T4]) Reduce1 ¶
Reduce1 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 1
func (Stream1[T1, T2, T3, T4]) Reduce2 ¶
Reduce2 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 2
func (Stream1[T1, T2, T3, T4]) Reduce3 ¶
Reduce3 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 3
type Stream2 ¶
Stream2 a sequence of elements of type 2
func (Stream2[T1, T2, T3, T4]) Filter ¶
Filter returns the results of the elements of this slice that match the given predicate
func (Stream2[T1, T2, T3, T4]) ForEach ¶
func (s Stream2[T1, T2, T3, T4]) ForEach(f func(T2))
ForEach performs an action for each element of this slice
func (Stream2[T1, T2, T3, T4]) Limit ¶
Limit returns the results of the elements of this slice, truncated to be no longer than maxSize in length
func (Stream2[T1, T2, T3, T4]) Map ¶
Map returns the results of applying the given function to the elements of this slice
func (Stream2[T1, T2, T3, T4]) Map1 ¶
Map1 returns the results of applying the given function to the elements of this slice
convert result to type 1
func (Stream2[T1, T2, T3, T4]) Map2 ¶
Map2 returns the results of applying the given function to the elements of this slice
convert result to type 2
func (Stream2[T1, T2, T3, T4]) Map3 ¶
Map3 returns the results of applying the given function to the elements of this slice
convert result to type 3
func (Stream2[T1, T2, T3, T4]) Map4 ¶
Map4 returns the results of applying the given function to the elements of this slice
convert result to type 4
func (Stream2[T1, T2, T3, T4]) Min ¶
Min returns the minimum element of this stream according to the provided less function
func (Stream2[T1, T2, T3, T4]) Reduce ¶
Reduce performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
func (Stream2[T1, T2, T3, T4]) Reduce1 ¶
Reduce1 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 1
func (Stream2[T1, T2, T3, T4]) Reduce2 ¶
Reduce2 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 2
func (Stream2[T1, T2, T3, T4]) Reduce3 ¶
Reduce3 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 3
type Stream3 ¶
Stream3 a sequence of elements of type 3
func (Stream3[T1, T2, T3, T4]) Filter ¶
Filter returns the results of the elements of this slice that match the given predicate
func (Stream3[T1, T2, T3, T4]) ForEach ¶
func (s Stream3[T1, T2, T3, T4]) ForEach(f func(T3))
ForEach performs an action for each element of this slice
func (Stream3[T1, T2, T3, T4]) Limit ¶
Limit returns the results of the elements of this slice, truncated to be no longer than maxSize in length
func (Stream3[T1, T2, T3, T4]) Map ¶
Map returns the results of applying the given function to the elements of this slice
func (Stream3[T1, T2, T3, T4]) Map1 ¶
Map1 returns the results of applying the given function to the elements of this slice
convert result to type 1
func (Stream3[T1, T2, T3, T4]) Map2 ¶
Map2 returns the results of applying the given function to the elements of this slice
convert result to type 2
func (Stream3[T1, T2, T3, T4]) Map3 ¶
Map3 returns the results of applying the given function to the elements of this slice
convert result to type 3
func (Stream3[T1, T2, T3, T4]) Map4 ¶
Map4 returns the results of applying the given function to the elements of this slice
convert result to type 4
func (Stream3[T1, T2, T3, T4]) Min ¶
Min returns the minimum element of this stream according to the provided less function
func (Stream3[T1, T2, T3, T4]) Reduce ¶
Reduce performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
func (Stream3[T1, T2, T3, T4]) Reduce1 ¶
Reduce1 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 1
func (Stream3[T1, T2, T3, T4]) Reduce2 ¶
Reduce2 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 2
func (Stream3[T1, T2, T3, T4]) Reduce3 ¶
Reduce3 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 3
type Stream4 ¶
Stream4 a sequence of elements of type 4
func (Stream4[T1, T2, T3, T4]) Filter ¶
Filter returns the results of the elements of this slice that match the given predicate
func (Stream4[T1, T2, T3, T4]) ForEach ¶
func (s Stream4[T1, T2, T3, T4]) ForEach(f func(T4))
ForEach performs an action for each element of this slice
func (Stream4[T1, T2, T3, T4]) Limit ¶
Limit returns the results of the elements of this slice, truncated to be no longer than maxSize in length
func (Stream4[T1, T2, T3, T4]) Map ¶
Map returns the results of applying the given function to the elements of this slice
func (Stream4[T1, T2, T3, T4]) Map1 ¶
Map1 returns the results of applying the given function to the elements of this slice
convert result to type 1
func (Stream4[T1, T2, T3, T4]) Map2 ¶
Map2 returns the results of applying the given function to the elements of this slice
convert result to type 2
func (Stream4[T1, T2, T3, T4]) Map3 ¶
Map3 returns the results of applying the given function to the elements of this slice
convert result to type 3
func (Stream4[T1, T2, T3, T4]) Map4 ¶
Map4 returns the results of applying the given function to the elements of this slice
convert result to type 4
func (Stream4[T1, T2, T3, T4]) Min ¶
Min returns the minimum element of this stream according to the provided less function
func (Stream4[T1, T2, T3, T4]) Reduce ¶
Reduce performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
func (Stream4[T1, T2, T3, T4]) Reduce1 ¶
Reduce1 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 1
func (Stream4[T1, T2, T3, T4]) Reduce2 ¶
Reduce2 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 2
func (Stream4[T1, T2, T3, T4]) Reduce3 ¶
Reduce3 performs a reduction on the elements of this slice, using the provided identity, accumulation and combining functions
convert result to type 3