xiter

package
v1.24.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package xiter provides iterator utilities.

It may or may not be superseded by `x/exp/xiter` package. See https://github.com/golang/go/issues/61898.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chunk

func Chunk[E any](seq iter.Seq[E], n int) iter.Seq[[]E]

Chunk returns an iterator over consecutive slices of up to n elements of seq. All but the last slice will have size n. All slices are clipped to have no capacity beyond the length. If seq is empty, the sequence is empty: there is no empty slice in the sequence. Chunk panics if n is less than 1.

https://github.com/golang/go/issues/61898#issuecomment-2522037782

Types

This section is empty.

Jump to

Keyboard shortcuts

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