slices

package
v0.5.23 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T any](s []T, cmp func(T) bool) bool

func Diff

func Diff[T cmp.Ordered](oldSlice, newSlice []T) (added, removed, kept []T)

func DiffFunc

func DiffFunc[T any](oldSlice, newSlice []T, cmp func(a, b T) int) (added, removed, kept []T)

func Filter

func Filter[T any](s []T, cmp func(T) bool) []T

func Map

func Map[T any](s []T, cb func(T) T) []T

func Shuffle

func Shuffle[T any](s []T)

func String

func String[T any](s []T) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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