slices

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Average

func Average[T Number](slice []T) T

func Concat

func Concat[T any](s ...[]T) []T

func Filter

func Filter[T, V any](slice []T, filter func(T) V) []V

func Intersection

func Intersection[T comparable](arrays ...[]T) []T

func IsSubset

func IsSubset[T comparable](subset, superset []T) bool

func Max

func Max[T constraints.Ordered](s []T) (m T)

func Min

func Min[T constraints.Ordered](s []T) (m T)

func Slice

func Slice[T any](v ...T) []T

func UnorderedEqual

func UnorderedEqual[T comparable](slices ...[]T) bool

Types

type Number

type Number interface {
	constraints.Float | constraints.Integer
}

Jump to

Keyboard shortcuts

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