1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-11-23 22:14:53 +02:00

fix: simplify type hints

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2025-11-11 15:24:45 +01:00
parent a4e790ac3d
commit 4f8a557072
112 changed files with 355 additions and 356 deletions

View File

@@ -28,7 +28,7 @@ func Memoize[F ~func(K) T, K comparable, T any](f F) F {
// ContramapMemoize converts a unary function into a unary function that caches the value depending on the parameter
func ContramapMemoize[F ~func(A) T, KF func(A) K, A any, K comparable, T any](kf KF) func(F) F {
return CacheCallback[func(F) F, func() func() T](kf, getOrCreate[K, T]())
return CacheCallback[func(F) F](kf, getOrCreate[K, T]())
}
// getOrCreate is a naive implementation of a cache, without bounds