Documentation ¶
Index ¶
- func AllMatch2[K, V any](seq iter.Seq2[K, V], test Predicate2[K, V]) bool
- func AnyMatch2[K, V any](seq iter.Seq2[K, V], test Predicate2[K, V]) bool
- func Collect2[K, V any](seq iter.Seq2[K, V]) (ks []K, vs []V)
- func Count2[K, V any](seq iter.Seq2[K, V]) (count int64)
- func Distinct2[K, V any, C comparable](seq iter.Seq2[K, V], f Function2[K, V, C]) iter.Seq2[K, V]
- func Enumerate2[K, V any](seq iter.Seq2[K, V]) iter.Seq2[int, *types.Pair[K, V]]
- func Filter2[K, V any](seq iter.Seq2[K, V], test Predicate2[K, V]) iter.Seq2[K, V]
- func FlatMap2[K, V, R any](seq iter.Seq2[K, V], flatten Function2[K, V, iter.Seq[R]]) iter.Seq[R]
- func FlatMap3[K, V, RK, RV any](seq iter.Seq2[K, V], flatten Function2[K, V, iter.Seq2[RK, RV]]) iter.Seq2[RK, RV]
- func Fold2[K, V, R any](seq iter.Seq2[K, V], initVal R, acc BiFunction2[R, K, V, R]) (result R)
- func Fold3[K, V, RK, RV any](seq iter.Seq2[K, V], initKey RK, initVal RV, ...) (resultKey RK, resultVal RV)
- func ForEach2[K, V any](seq iter.Seq2[K, V], accept Consumer2[K, V])
- func IsSorted2[K, V any](seq iter.Seq2[K, V], cmp Comparator2[K, V]) bool
- func Limit2[K, V any, Number constraints.Number](seq iter.Seq2[K, V], limit Number) iter.Seq2[K, V]
- func Map2[K, V, R any](seq iter.Seq2[K, V], f Function2[K, V, R]) iter.Seq[R]
- func Map3[K, V, RK, RV any](seq iter.Seq2[K, V], f Function3[K, V, RK, RV]) iter.Seq2[RK, RV]
- func NoneMatch2[K, V any](seq iter.Seq2[K, V], test Predicate2[K, V]) bool
- func Peek2[K, V any](seq iter.Seq2[K, V], accept Consumer2[K, V]) iter.Seq2[K, V]
- func Reduce2[K, V any](seq iter.Seq2[K, V], acc BinaryOperator2[K, V]) (K, V, bool)
- func Seq2Seq[K, V any](seq2 iter.Seq2[K, V]) iter.Seq[*types.Pair[K, V]]
- func Skip2[K, V any, Number constraints.Number](seq iter.Seq2[K, V], skip Number) iter.Seq2[K, V]
- func Sorted2[K, V any](it iter.Seq2[K, V], cmp Comparator2[K, V]) iter.Seq2[K, V]
- func Zip2[K, V any](seq1 iter.Seq2[K, V], seq2 iter.Seq2[K, V]) iter.Seq2[K, V]
- type BiFunction2
- type BiFunction3
- type BinaryOperator2
- type Comparator2
- type Consumer2
- type Function2
- type Function3
- type Predicate2
- type Seq2
- func ChannelAll2[T any](c chan T) Seq2[int, T]
- func HashMapAll2[K comparable, V any](m map[K]V) Seq2[K, V]
- func RangeAll2[T constraints.Number](begin, end, step T) Seq2[int, T]
- func SliceAll2[T any](input []T) Seq2[int, T]
- func SliceBackward2[T any](input []T) Seq2[int, T]
- func StringAll2(input string) Seq2[int, rune]
- type Stream2
- type Supplier2
- type UnaryOperator2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fold2 ¶
func Fold2[K, V, R any](seq iter.Seq2[K, V], initVal R, acc BiFunction2[R, K, V, R]) (result R)
func Fold3 ¶
func Fold3[K, V, RK, RV any](seq iter.Seq2[K, V], initKey RK, initVal RV, acc BiFunction3[RK, RV, K, V, RK, RV]) (resultKey RK, resultVal RV)
func NoneMatch2 ¶
func NoneMatch2[K, V any](seq iter.Seq2[K, V], test Predicate2[K, V]) bool
Types ¶
type BiFunction2 ¶
type BiFunction2[K, V, R, U any] func(K, V, R) U
type BiFunction3 ¶
type BiFunction3[K, V, RK, RV, UK, UV any] func(K, V, RK, RV) (UK, UV)
type BinaryOperator2 ¶
type BinaryOperator2[K, V any] func(K, V, K, V) (K, V)
type Comparator2 ¶
Comparator 比较两个元素. 第一个元素大于第二个元素时,返回正数; 第一个元素小于第二个元素时,返回负数; 否则返回 0.
type Seq2 ¶
func ChannelAll2 ¶
func HashMapAll2 ¶
func HashMapAll2[K comparable, V any](m map[K]V) Seq2[K, V]
func SliceBackward2 ¶
type Stream2 ¶
type Stream2[K, V any] interface { Seq2() iter.Seq2[K, V] Filter(Predicate2[K, V]) Stream2[K, V] Peek(Consumer2[K, V]) Stream2[K, V] Distinct(Function2[K, V, int]) Stream2[K, V] SortedByKeys(Comparator[K]) Stream2[K, V] SortedByValues(Comparator[V]) Stream2[K, V] Limit(int64) Stream2[K, V] Skip(int64) Stream2[K, V] ForEach(Consumer2[K, V]) Collect() ([]K, []V) AllMatch(Predicate2[K, V]) bool NoneMatch(Predicate2[K, V]) bool AnyMatch(Predicate2[K, V]) bool First() (K, V) Count() int64 }
type UnaryOperator2 ¶
type UnaryOperator2[K, V any] func(K, V) (K, V)
Click to show internal directories.
Click to hide internal directories.