slices

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package slices contains functions for working with slices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[S ~[]E, E comparable](s S, e E) bool

Contains returns true if e is in s.

func Filter

func Filter[S ~[]E, E any](s S, f func(E) bool) S

Filter returns a new slice containing only those elements for which f(element) is true.

func Remove

func Remove[S ~[]E, E comparable](s S, e E) S

Remove removes e from s.

func Unique

func Unique[S ~[]E, E comparable](s S) S

Unique returns the unique elements of s.

Types

This section is empty.

Jump to

Keyboard shortcuts

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