iterx

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: MIT Imports: 1 Imported by: 0

README

extra iterators for Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Batch added in v0.3.0

func Batch[T any](it iter.Seq[T], n int) iter.Seq[[]T]

Batch iterator into groups of n elements. Returned slices is reused between iterators. If caller needs a copy, caller should copy himself.

func FilterKV added in v0.2.0

func FilterKV[K, V comparable](i iter.Seq2[K, V], keep func(K, V) bool) iter.Seq2[K, V]

func MergeKV added in v0.2.0

func MergeKV[K comparable, V any](is ...iter.Seq2[K, V]) iter.Seq2[K, V]

func MergeOrdered

func MergeOrdered[T any](cmp func(T, T) bool, iters ...iter.Seq[T]) iter.Seq[T]

Types

This section is empty.

Jump to

Keyboard shortcuts

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