iterutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlatMap

func FlatMap[V, R any](seq iter.Seq[V], f func(V) iter.Seq[R]) iter.Seq[R]

FlatMap returns a new iterator that applies the function to each value from the input iterator. The output iterator yields the results of the function calls.

func Intersection

func Intersection[V comparable](iters ...iter.Seq[V]) iter.Seq[V]

Intersection returns a new iterator that yields the intersection of the input iterators. The intersection is the set of values that are present in all input iterators.

func Map

func Map[V, R any](seq iter.Seq[V], f func(V) R) iter.Seq[R]

Map returns a new iterator that applies the function to each value from the input iterator. The output iterator yields the results of the function calls.

func Union

func Union[V comparable](iters ...iter.Seq[V]) iter.Seq[V]

Union returns a new iterator that yields the union of the input iterators. The union is the set of values that are present in any of the input iterators.

func Uniq

func Uniq[V comparable](seq iter.Seq[V]) iter.Seq[V]

Uniq returns a new iterator that yields the unique values from the input iterator. The order of the output is the same as the input.

Types

This section is empty.

Jump to

Keyboard shortcuts

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