fn

package
v0.0.94 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchGet

func BatchGet[T any](ids []string, reqMaker func(string) (T, error)) (out map[string]T)

func Filter

func Filter[T any](items []T, filtfunc func(T) bool) (out []T)

func IndexOf

func IndexOf[T any](items []T, matchfunc func(T) bool) int

func Map

func Map[T any, U any](items []T, mapfunc func(T) U) (out []U)

func MapKeys

func MapKeys[K comparable, V any](input map[K]V) []K

func MapValues

func MapValues[V any, K comparable](input map[K]V) []V

func Reduce

func Reduce[T any, V any](input []T, reducer func(index int, item T, output V) V, out V) V

Types

This section is empty.

Jump to

Keyboard shortcuts

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