Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IgnoreErr ¶ added in v0.3.0
IgnoreErr[S []T, T any](s S, err error) S
IgnoreErr returns the input slice without modifying it. It is used to ignore errors that may be returned from a function call. The function takes in a slice of any type and an error value, and returns the same slice as input.
func Map ¶
func Map[In, Out any](in []In, fn func(In) Out) []Out
Map maps the input slice using the provided mapper function.
func MapErr ¶ added in v0.3.0
MapErr maps the input slice using the provided mapper function that returns an Out and an error. It returns a new slice of type Out and an error if any occurred during execution. [In] represents the type of input slice and [Out] represents the type of output slice.
func Unique ¶
func Unique[In ~[]T, T comparable](in In) []T
Unique returns a new slice containing the unique elements of the input slice.
Types ¶
This section is empty.