Documentation
¶
Index ¶
- func Filter[T any](s iter.Seq[T], p func(v T) bool) iter.Seq[T]
- func Filter2[K any, V any](s iter.Seq2[K, V], p func(k K, v V) bool) iter.Seq2[K, V]
- func Find[T any](s iter.Seq[T], f func(v T) bool) (T, bool)
- func Find2[K any, V any](s iter.Seq2[K, V], f func(k K, v V) bool) (K, V, bool)
- func Map[T any, U any](src iter.Seq[T], f func(T) U) iter.Seq[U]
- func Map2[K1, V1, K2, V2 any](src iter.Seq2[K1, V1], f func(K1, V1) (K2, V2)) iter.Seq2[K2, V2]
- func Map2To1[K, V, T any](src iter.Seq2[K, V], f func(K, V) T) iter.Seq[T]
- func MapTo2[T, K, V any](src iter.Seq[T], f func(T) (K, V)) iter.Seq2[K, V]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Find ¶
Find returns the first element in s satisfying predicate f and true. If no element matches, it returns the zero value of T and false.
func Find2 ¶
Find2 returns the first key-value pair in s satisfying predicate f and true. If no pair matches, it returns zero values of K and V, and false.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.