Documentation ¶
Index ¶
- func Filter[V any](in iter.Seq[V], filterfn func(V) bool) iter.Seq[V]
- func Filter2[K, V any](in iter.Seq2[K, V], filterfn func(K, V) bool) iter.Seq2[K, V]
- func FilterErr[V any](in iter.Seq[V], filterfn func(V) (bool, error)) iter.Seq2[V, error]
- func HandleError[V, R any](erriter iter.Seq2[V, error], fn func(iter.Seq[V]) R) (r R, err error)
- func Map11[A, B any](in iter.Seq[A], mapfn func(A) B) iter.Seq[B]
- func Map12[A, B, C any](in iter.Seq[A], mapfn func(A) (B, C)) iter.Seq2[B, C]
- func Map21[A, B, C any](in iter.Seq2[A, B], mapfn func(A, B) C) iter.Seq[C]
- func Map22[A, B, C, D any](in iter.Seq2[A, B], mapfn func(A, B) (C, D)) iter.Seq2[C, D]
- func SliceCollectError[E any](seq iter.Seq2[E, error]) ([]E, error)
- func SliceSortedError[E cmp.Ordered](seq iter.Seq2[E, error]) ([]E, error)
- func SliceSortedFuncError[E cmp.Ordered](seq iter.Seq2[E, error], cmp func(E, E) int) ([]E, error)
- func StopOnError[V any](erriter func(yield func(V) bool) error) iter.Seq2[V, error]
- type GeneratorResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleError ¶
func SliceSortedFuncError ¶
Types ¶
type GeneratorResult ¶
GeneratorResult is the result of a generator. Calling it will block until the associated iterator has finished.
func Generator2 ¶
func Generator2[K, V, R any](gf func(yield func(K, V) bool) (R, error)) (iter.Seq2[K, V], GeneratorResult[R])
Generator2 is just like Generator except it allows the iterator to have 2 values for iter.Seq2
Click to show internal directories.
Click to hide internal directories.