Documentation ΒΆ
Index ΒΆ
- func Accumulate[T intType](seq iter.Seq[T]) iter.Seq[T]
- func AccumulateFunc[T any](seq iter.Seq[T], f func(T, T) T) iter.Seq[T]
- func AccumulateFuncSlice[T any](arr []T, f func(T, T) T) iter.Seq[T]
- func AccumulateSlice[T intType](arr []T) iter.Seq[T]
- func Apply[U, V any](seq iter.Seq[U], f func(U) V) iter.Seq[V]
- func ApplySlice[U, V any](arr []U, f func(U) V) iter.Seq[V]
- func Chain[T any](seqs ...iter.Seq[T]) iter.Seq[T]
- func ChainSlice[T any](arr ...[]T) iter.Seq[T]
- func Combinations[T any](arr []T, k int) iter.Seq[[]T]
- func Count[T intType](start, step T) iter.Seq[T]
- func Cycle[T any](seq iter.Seq[T]) iter.Seq[T]
- func CycleSlice[T any](arr []T) iter.Seq[T]
- func Drop[T any](seq iter.Seq[T], predicate func(T) bool) iter.Seq[T]
- func DropSlice[T any](arr []T, predicate func(T) bool) iter.Seq[T]
- func Extend[T any](seq iter.Seq[T]) iter.Seq2[struct{}, T]
- func Filter[T any](seq iter.Seq[T], predicate func(T) bool) iter.Seq[T]
- func FilterSlice[T any](arr []T, predicate func(T) bool) iter.Seq[T]
- func FromSlice[T any](arr []T) iter.Seq[T]
- func FromString(s string) iter.Seq[rune]
- func Index[T any](seq iter.Seq[T]) iter.Seq2[int, T]
- func Limit[T any](seq iter.Seq[T], n int) iter.Seq[T]
- func LimitSlice[T any](arr []T, n int) iter.Seq[T]
- func PairWise[T any](seq iter.Seq[T]) iter.Seq[[2]T]
- func PairWiseSlice[T any](arr []T) iter.Seq[[2]T]
- func Permutations[T any](arr []T, k int) iter.Seq[[]T]
- func Product[U, V any](seq1 iter.Seq[U], seq2 iter.Seq[V]) iter.Seq[lo.Tuple2[U, V]]
- func ProductSlice[U, V any](arr1 []U, arr2 []V) iter.Seq[lo.Tuple2[U, V]]
- func Range[T intType](start, end, step T) iter.Seq[T]
- func RangeOver[T any](seq iter.Seq[T], start, step, stop int) iter.Seq[T]
- func Repeat[T intType](elem T) iter.Seq[T]
- func Tee[T any](seq iter.Seq[T], n int) []iter.Seq[T]
- func ToSlice[T any](seq iter.Seq[T]) []T
- func Unpack[U, V any](seq iter.Seq2[U, V]) (iter.Seq[U], iter.Seq[V])
- func UnpackMap[U comparable, V any](in map[U]V) (iter.Seq[U], iter.Seq[V])
- func While[T any](seq iter.Seq[T], predicate func(T) bool) iter.Seq[T]
- func WhileSlice[T any](arr []T, predicate func(T) bool) iter.Seq[T]
- func Zip[U, V any](seq1 iter.Seq[U], seq2 iter.Seq[V]) iter.Seq[lo.Tuple2[U, V]]
- func ZipFill[U, V any](seq1 iter.Seq[U], seq2 iter.Seq[V], fillU U, fillV V) iter.Seq[lo.Tuple2[U, V]]
- func ZipFillSlice[U, V any](arr1 []U, arr2 []V, fillU U, fillV V) iter.Seq[lo.Tuple2[U, V]]
- func ZipSlice[U, V any](arr1 []U, arr2 []V) iter.Seq[lo.Tuple2[U, V]]
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func Accumulate ΒΆ
Accumulate returns an iterator that yields the accumulated sum of the elements yielded by seq
func AccumulateFunc ΒΆ
AccumulateFunc returns an iterator that yields the accumulated result of applying f to the elements yielded by seq
func AccumulateFuncSlice ΒΆ
AccumulateFuncSlice returns an iterator that yields the accumulated result of applying f to the elements in the slice
func AccumulateSlice ΒΆ
AccumulateSlice returns an iterator that yields the accumulated sum of the elements in the slice
func Apply ΒΆ
Apply returns an iterator that yields the result of applying f to each element yielded by the sequence
func ApplySlice ΒΆ
ApplySlice returns an iterator that yields the result of applying f to each element in the slice
func ChainSlice ΒΆ
ChainSlice returns an iterator that yields the elements of the slice in order
func Combinations ΒΆ
Combinations returns an iterator that yields all possible k-length combinations of the slice If k <= 0, the empty iterator is returned. If k > len(seq), the iterator yields all combinations of seq
func Cycle ΒΆ
Cycle returns an infinite iterator that cycles repeatedly through the elements of sequence
func CycleSlice ΒΆ
CycleSlice returns an infinite iterator that cycles repeatedly through the elements of the slice
func FilterSlice ΒΆ
FilterSlice returns an iterator that yields elements matching the predicate
func FromString ΒΆ
FromString is a convenience wrapper to convert a string to an iterator
func Index ΒΆ
Index returns an iterator that yields the index and value of the yielded elements from the sequence
func Limit ΒΆ
Limit returns an iterator that yields the up to the first n elements yielded by the sequence
func LimitSlice ΒΆ
LimitSlice returns an iterator that yields the up to the first n elements of the slice
func PairWise ΒΆ
PairWise returns an iterator that yields pairs of adjacent elements yielded by seq If the sequence has less than 2 elements, the empty iterator is returned
func PairWiseSlice ΒΆ
PairwiseSlice returns an iterator that yields pairs of adjacent elements in the slice If the slice has less than 2 elements, the empty iterator is returned
func Permutations ΒΆ
Permutations returns an iterator that yields all possible n-length permutations of the slice If k <= 0, the empty iterator is returned. If k > len(seq), the iterator yields all permutations of seq
Note : allocates a state buffer of the same size as the input to keep track of visited permutations as we iterate through them.
func Product ΒΆ
Product returns an iterator that yields the cartesian product of seq1 and seq2 as a tuple. The returned iterator of tuples is ordered [A1, B1], [A1, B2], [A2, B1], [A2, B2], ...
Expects to fully consume seq1 before seq2
func ProductSlice ΒΆ
ProductSlice returns an iterator that yields the cartesian product of slice1 and slice2 as a tuple. The returned iterator of tuples is ordered [A1, B1], [A1, B2], [A2, B1], [A2, B2], ...
func RangeOver ΒΆ
RangeOver returns an iterator that yields the elements of the sequence from start to stop incrementing by step
func Tee ΒΆ
Tee returns n iterators that yield the elements of the sequence If n == 1, the only element in the slice will be the original seq
func ToSlice ΒΆ
ToSlice is a convenience wrapper to convert an iterator to a slice
This will block until the iterator is exhausted.
func While ΒΆ
While returns an iterator that yields elements of the sequence until the predicate is false
func WhileSlice ΒΆ
WhileSlice returns an iterator that yields elements of the slice until the predicate is false
func ZipFill ΒΆ
func ZipFill[U, V any](seq1 iter.Seq[U], seq2 iter.Seq[V], fillU U, fillV V) iter.Seq[lo.Tuple2[U, V]]
ZipFill returns an iterator that yields the elements of seq1 and seq2 as a tuple, padding missing values as necessary
func ZipFillSlice ΒΆ
ZipFillSlice returns an iterator that yields the elements of arr1 and arr2 as a tuple, padding missing values as necessary
Types ΒΆ
This section is empty.