xslices

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package xslices provides some generic utilities missed from x/exp/slices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

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

Filter performs in-place filtering of a slice.

func FindFunc

func FindFunc[S ~[]E, E any](s S, equal func(E) bool) (r E, _ bool)

FindFunc returns the first element satisfying the predicate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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