package
Version:
v1.0.0-rc6
Opens a new window with list of versions in this module.
Published: Jan 16, 2025
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](source []T, condition func(T) bool) bool
All checks if all elements in the slice satisfy the condition
func Any[T any](source []T, condition func(T) bool) bool
Any checks if any element in the slice satisfies the condition
func FindAll[T any](source []T, condition func(T) bool) []T
FindAll returns all elements in the slice that satisfy the condition
func FindFirst[T any](source []T, condition func(T) bool) (element T, ok bool)
FindFirst returns the first element in the slice that satisfies the condition
func Reduce[TSource, TAccumulation any](source []TSource, seed TAccumulation, accumulator func(TAccumulation, TSource) TAccumulation) TAccumulation
Reduce applies a function against an accumulator and each element in the slice (from left to right) to reduce it to a single value.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.