slices

package
v0.0.0-...-f2ddc2e Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T any](slice []T, testFunction func(T) bool) (ret []T)

Filter returns a new slice containing only the elements of slice that satisfy the test function.

func Intersection

func Intersection(s1, s2 []string) int

Intersection returns the number of elements intersection between two slices with respect to the order, i.e. Intersection(["a", "b", "c"], ["a", "b", "d"]) == 2 but Intersection(["a", "b", "c"], ["b", "a", "c"]) == 0

Types

This section is empty.

Jump to

Keyboard shortcuts

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