iters

package
v0.0.0-...-2f16d0f Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

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

Concat returns an iterator over a sequence of sequences (in order).

func Map

func Map[T, U any](in iter.Seq[T], f func(T) U) iter.Seq[U]

Map applies a transform to each item in a sequence.

func Postpend

func Postpend[T any](seq iter.Seq[T], ts ...T) iter.Seq[T]

Postpend returns an iterator over a sequence, and then some items.

func Prepend

func Prepend[T any](seq iter.Seq[T], ts ...T) iter.Seq[T]

Prepend returns an iterator over some items, and then a sequence.

func Short

func Short[T any](ts ...T) iter.Seq[T]

Short returns slices.Values(ts). It's semantic sugar for slices.Values([]T{x, y, z}), which is useful when T is a bit longer.

func Slices

func Slices[E any, S ~[]E](ss ...S) iter.Seq[E]

Slices returns an iterator over multiple slices (in order).

Types

This section is empty.

Jump to

Keyboard shortcuts

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