Documentation
¶
Index ¶
- func Chunk[T any](s iter.Seq[T], n int) iter.Seq[iter.Seq[T]]
- func ChunkPairs[T any](input iter.Seq[T]) iter.Seq2[T, T]
- func Drop[T any](s iter.Seq[T], n int) iter.Seq[T]
- func DropWhile[T any](s iter.Seq[T], predicate func(T) bool) iter.Seq[T]
- func Take[T any](s iter.Seq[T], n int) iter.Seq[T]
- func TakeWhile[T any](s iter.Seq[T], predicate func(T) bool) iter.Seq[T]
- func UnnestOnce[T any](nested iter.Seq[iter.Seq[T]]) iter.Seq[T]
- func Zip[A, B any](as iter.Seq[A], bs iter.Seq[B]) iter.Seq2[A, B]
- func ZipAll[A, B any](as iter.Seq[A], bs iter.Seq[B], fillA A, fillB B) iter.Seq2[A, B]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chunk ¶ added in v0.3.0
Chunk returns an iterator over consecutive elements of up to n elements of s.
func ChunkPairs ¶ added in v0.6.0
ChunkPairs returns an iterator iter.Seq2[T, T] that generates consecutive pairs (T, T) from the input iterator iter.Seq[T]. If the input sequence has an odd number of elements, the last element is ignored.
func Drop ¶
Drop returns new iter.Seq that yields all elements from the argument except first n ones.
If n < 0, iter.Seq that yields all elements from the argument.
func DropWhile ¶
DropWhile returns new iter.Seq that yields the elements but dropped longest prefix satisfy the predicate from the argument.
func TakeWhile ¶
TakeWhile return new iter.Seq that yields longest prefix of elements from the argument.
func UnnestOnce ¶ added in v0.4.0
UnnestOnce flattens a sequence of sequences into a single sequence.
Types ¶
This section is empty.