generic

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cache

func Cache[F ~func(K) T, K comparable, T any](f F) F

Cache converts a unary function into a unary function that caches the value depending on the parameter

func CacheCallback

func CacheCallback[F ~func(A) T, KF func(A) K, C ~func(K, func() func() T) func() T, A any, K comparable, T any](kf KF, getOrCreate C) func(F) F

CacheCallback converts a unary function into a unary function that caches the value depending on the parameter

func ContramapCache

func ContramapCache[F ~func(A) T, KF func(A) K, A any, K comparable, T any](kf KF) func(F) F

ContramapCache converts a unary function into a unary function that caches the value depending on the parameter

Types

This section is empty.

Jump to

Keyboard shortcuts

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