slices

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyMatches

func AnyMatches[T comparable, S ~[]T](s S, filter func(v T) bool) bool

AnyMatches checks if any value in the slice matches the filter. If so, true is returned, otherwise false.

func Contains

func Contains[T comparable, S ~[]T](slice S, value T) bool

Contains checks if a value is present in

func Difference

func Difference[T comparable, S ~[]T](a S, b S) S

Difference is removing all elements from a which are present in b. It is the mathematical set-operation equivalent as (A - B)

Types

This section is empty.

Jump to

Keyboard shortcuts

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