iterx

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChunkDuration added in v0.5.1

func ChunkDuration[V any](seq iter.Seq[V], d time.Duration) iter.Seq[[]V]

ChunkDuration splits sequence by time window and returns chunked sequence.

func ChunkN added in v0.5.1

func ChunkN[V any](seq iter.Seq[V], n int) iter.Seq[[]V]

ChunkN splits a sequence into fixed-size batches

func Concat added in v0.5.1

func Concat[T any](seqs ...iter.Seq[T]) iter.Seq[T]

func Debounce added in v0.5.1

func Debounce[V any](seq iter.Seq[V], d time.Duration) iter.Seq[V]

func Filter

func Filter[V any](seq iter.Seq[V], filter func(V) bool) iter.Seq[V]

Filter returns a filtered iteration from seq by filter

func Flatten added in v0.5.1

func Flatten[T any](seq iter.Seq[iter.Seq[T]]) iter.Seq[T]

func Map

func Map[I, O any](seq iter.Seq[I], m func(I) O) iter.Seq[O]

Map returns a mapped sequence

func MapFilter added in v0.5.1

func MapFilter[I, O any](seq iter.Seq[I], filter func(I) (O, bool)) iter.Seq[O]

MapFilter returns a mapped and filtered sequence

func MapOf added in v0.5.1

func MapOf[K comparable, V any, M ~map[K]V](m M) iter.Seq2[K, V]

MapOf converts a map to iteration with key and value

func Merge added in v0.5.1

func Merge[T any](seqs ...iter.Seq[T]) iter.Seq[T]

func Of added in v0.5.1

func Of[V any, E ~[]V](values E) iter.Seq[V]

func OrderedMapOf added in v0.5.2

func OrderedMapOf[K cmp.Ordered, V any, M ~map[K]V](m M) iter.Seq2[K, V]

func Recv added in v0.5.1

func Recv[V any](c <-chan V) iter.Seq[V]

func RecvContext added in v0.5.1

func RecvContext[V any](ctx context.Context, c <-chan V) iter.Seq[V]

func SliceOf added in v0.5.1

func SliceOf[T any, E ~[]T](values E) iter.Seq2[int, T]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL