seq

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T any](seq iter.Seq[T], fn func(T) bool) iter.Seq[T]

Filter is a function the yields only values for which the predicate returns `true`.

func Flatten

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

Flatten is a function that merges a set of provided `iter.Seq[T]` values into a single `iter.Seq[T]` value. The values of each input are yielded in the order yielded by each `iter.Seq[T]`, in the order provided to the function.

func Sequence

func Sequence[T any](items ...T) iter.Seq[T]

Sequence is a function that turns its input into an `iter.Seq[T]` that yields values in the order that they were provided to the function.

func Transform

func Transform[T any, U any](seq iter.Seq[T], fn func(T) U) iter.Seq[U]

Transform is a function that maps the values yielded by the input `seq` to values produced by the input function `fn`, and returns an `iter.Seq` that yields those new values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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