slice

package
v0.8.19 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T any](data []T, f func(T) bool) []T

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

func Intersect

func Intersect[T comparable](a, b []T) []T

Intersect returns the intersection of two comparable slices.

func Map

func Map[T, U any](data []T, f func(T) U) []U

Map applies a function to each element of a slice and returns a new slice with the results.

Types

This section is empty.

Jump to

Keyboard shortcuts

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