package
Version:
v0.3.1
Opens a new window with list of versions in this module.
Published: Apr 7, 2023
License: Apache-2.0
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 Filter[T any](in []T, fn func(T) bool) []T
-
func IgnoreErr[S []T, T any](s S, err error) S
-
func Map[In, Out any](in []In, fn func(In) Out) []Out
-
func MapErr[In, Out any](in []In, fn func(In) (Out, error)) ([]Out, error)
-
func Unique[In ~[]T, T comparable](in In) []T
func Filter[T any](in []T, fn func(T) bool) []T
Filter filters the input slice using the provided filter function.
func IgnoreErr[S []T, T any](s S, err error) S
func Map[In, Out any](in []In, fn func(In) Out) []Out
Map maps the input slice using the provided mapper function.
func MapErr[In, Out any](in []In, fn func(In) (Out, error)) ([]Out, error)
Unique returns a new slice containing the unique elements of the input slice.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.