sliceutils

package
v0.0.0-...-28f0728 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: GPL-3.0 Imports: 0 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map[T, U any](s []T, f func(T, int) U) []U

Map applies a function to each element of a slice and returns a new slice with the results.

func MapErr

func MapErr[T, U any](s []T, f func(T, int) (U, error)) ([]U, error)

MapErr applies a function to each element of a slice and returns a new slice with the results. If the function returns an error, the function stops and returns the error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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