Documentation
¶
Index ¶
- func Concat[V any](sequences ...iter.Seq[V]) iter.Seq[V]
- func Concat2[K any, V any](sequences ...iter.Seq2[K, V]) iter.Seq2[K, V]
- func Filter[T any](inputSlice []T, f func(T) bool) []T
- func Map[InputType any, OutputType any](inputSlice []InputType, f func(InputType) OutputType) []OutputType
- func MapFilter[InputType any, OutputType any](inputSlice []InputType, f func(InputType) OutputType) []OutputType
- func Set[T comparable](elementSlices ...[]T) []T
- func SetDifference[T any, U comparable](set1 map[U]T, set2 map[U]T) map[U]T
- func SetIntersection[T any, U comparable](set1 map[U]T, set2 map[U]T) map[U]T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
Click to show internal directories.
Click to hide internal directories.