Documentation ¶
Index ¶
- func Between(l, r int) iter.Seq[int]
- func Chars(s string) iter.Seq[string]
- func ConsumeChannel[T any](c <-chan T) iter.Seq[T]
- func Each[T any, F ~func(T)](seq iter.Seq[T], f F)
- func Filter[T any, F ~func(T) bool](seq iter.Seq[T], f F) iter.Seq[T]
- func First[T any](seq iter.Seq[T]) (T, bool)
- func Iterator[T any](s []T) iter.Seq[T]
- func Join[T any](iters ...iter.Seq[T]) iter.Seq[T]
- func Last[T any](seq iter.Seq[T]) (T, bool)
- func Map[T any, E any, F ~func(T) E](seq iter.Seq[T], f F) iter.Seq[E]
- func Max[T constraints.Ordered](seq iter.Seq[T]) T
- func Min[T constraints.Ordered](seq iter.Seq[T]) T
- func Nth[T any](seq iter.Seq[T], n uint) (T, bool)
- func Partition[T any, F ~func(T) bool](seq iter.Seq[T], f F) (iter.Seq[T], iter.Seq[T])
- func Position[T comparable](seq iter.Seq[T], i T) (int, bool)
- func Range(n int) iter.Seq[int]
- func Reduce[T any, A ~func(T, T) T](seq iter.Seq[T], a A, initial ...T) T
- func Split(s string, sep string) iter.Seq[string]
- func TryMap[T any, E any, F ~func(T) (E, error)](seq iter.Seq[T], f F) iter.Seq2[E, error]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsumeChannel ¶
ConsumeChannel reads from channel until it closes and yield values as iter.Seq[T].
func Filter ¶
Filter filters iter.Seq[T] with F and returns iter.Seq[T] containing only those values for which F returns true.
func Max ¶
func Max[T constraints.Ordered](seq iter.Seq[T]) T
Max finds maximum element in an iter.Seq[T].
func Min ¶
func Min[T constraints.Ordered](seq iter.Seq[T]) T
Min finds minimum element in an iter.Seq[T].
func Position ¶
func Position[T comparable](seq iter.Seq[T], i T) (int, bool)
Position searches for an element in an iter.Seq[T], returning its index.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.