iter

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

func Concat[V any](sequences ...iter.Seq[V]) iter.Seq[V]

func Concat2

func Concat2[K any, V any](sequences ...iter.Seq2[K, V]) iter.Seq2[K, V]

func Filter

func Filter[T any](inputSlice []T, f func(T) bool) []T

func Map

func Map[InputType any, OutputType any](inputSlice []InputType, f func(InputType) OutputType) []OutputType

func MapFilter

func MapFilter[InputType any, OutputType any](inputSlice []InputType, f func(InputType) OutputType) []OutputType

func Set

func Set[T comparable](elementSlices ...[]T) []T

Set returns the elements of the slices with duplicates removed, in the order they were first seen.

The order is part of what it returns, not an accident of how it is implemented: collecting the keys of a map would hand back a different order on every run, and a caller that picks one element out of the result - or renders it - would then answer differently each time for the same input.

func SetDifference

func SetDifference[T any, U comparable](set1 map[U]T, set2 map[U]T) map[U]T

func SetIntersection

func SetIntersection[T any, U comparable](set1 map[U]T, set2 map[U]T) map[U]T

Types

This section is empty.

Jump to

Keyboard shortcuts

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