predicates

package
v1.31.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 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, predicate Predicate[T]) []T

Filter returns a slice of elements that match the predicate.

Types

type Predicate

type Predicate[T any] func(T) bool

Predicate is a predicate function for a type.

func AllOf

func AllOf[T any](predicates ...Predicate[T]) Predicate[T]

AllOf returns a predicate that is true if all of the given predicates are true.

Jump to

Keyboard shortcuts

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