sliceutils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All[T any](ts []T, predicate func(t T) bool) bool

func Filter

func Filter[T any](ts []T, fn func(t T) bool) []T

func FindFirst

func FindFirst[T any](ts []T, fn func(t T) bool) (returnedT T, found bool)

func FindLast

func FindLast[T any](ts []T, fn func(t T) bool) (returnedT T, found bool)

func Generate added in v0.3.0

func Generate[U any](from, to int, fn func(t int) U) []U

func Map

func Map[T, U any](ts []T, fn func(t T) U) []U

func MapWithError

func MapWithError[T, U any](ts []T, fn func(t T) (U, error)) ([]U, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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