set

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply[K comparable](in []K, f func(K) K) []K

Apply applies the given function to every element of the slice.

func Filter

func Filter[K comparable](in []K, r ...K) []K

Filter filters all r's from the input list.

func Map

func Map[K comparable](in []K) map[K]bool

Map takes a slice of a given type and create a boolean map with keys of that type.

func Sorted

func Sorted[K constraints.Ordered](l []K) []K

Sorted returns a sorted set of the input.

func SortedFiltered

func SortedFiltered[K constraints.Ordered](l []K, want func(K) bool) []K

SortedFiltered returns a sorted set of the input, filtered by the predicate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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