utils

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SliceMap

func SliceMap[Domain, Range any](slice []Domain, fn func(Domain) Range) []Range

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

func SliceMapE added in v0.3.1

func SliceMapE[Domain, Range any](slice []Domain, fn func(Domain) (Range, error)) ([]Range, error)

SliceMapE applies a function to each element of a slice and returns a new slice with the results. If an error occurs during the loop, it will be interrupted and the error will be returned.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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