mirror of
https://github.com/IBM/fp-go.git
synced 2025-11-27 22:28:29 +02:00
fix: refactor
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@@ -51,7 +51,7 @@ import "github.com/IBM/fp-go/v2/ioeither"
|
||||
// result := withFile(func(f *File) ReaderIOEither[Config, error, string] {
|
||||
// return readContent(f)
|
||||
// })
|
||||
func WithResource[A, L, E, R, ANY any](onCreate ReaderIOEither[L, E, R], onRelease func(R) ReaderIOEither[L, E, ANY]) func(func(R) ReaderIOEither[L, E, A]) ReaderIOEither[L, E, A] {
|
||||
func WithResource[A, L, E, R, ANY any](onCreate ReaderIOEither[L, E, R], onRelease Kleisli[L, E, R, ANY]) Kleisli[L, E, Kleisli[L, E, R, A], A] {
|
||||
return func(f func(R) ReaderIOEither[L, E, A]) ReaderIOEither[L, E, A] {
|
||||
return func(l L) ioeither.IOEither[E, A] {
|
||||
// dispatch to the generic implementation
|
||||
|
||||
Reference in New Issue
Block a user