package
Version:
v0.0.0-...-b33464d
Opens a new window with list of versions in this module.
Published: Jul 31, 2024
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func All[T any](slice []T, predicate func(T) bool) bool
func Any[T any](slice []T, predicate func(T) bool) bool
func Filter[T any](slice []T, predicate func(T) bool) []T
filters elements of a slice based on a predicate function, returning a new slice containing only elements that match the predicate
func Find[T any](slice []T, predicate func(T) bool) (T, bool)
returns the first element in the slice that satisfies the specified predicate, or an indication that no such element exists.
func Partition[T any](slice []T, predicate func(T) bool) ([]T, []T)
splits the slice into two slices based on a predicate: one for elements that satisfy the predicate and another for those that do not
Source Files
¶
Click to show internal directories.
Click to hide internal directories.