1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-08-10 22:31:32 +02:00

fix: refactor either type (#102)

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Carsten Leue
2024-02-07 11:03:20 +01:00
committed by GitHub
parent 7daf65effc
commit 8150ae2a68
18 changed files with 59 additions and 58 deletions

View File

@@ -47,5 +47,5 @@ func ExampleReadFile() {
fmt.Println(result())
// Output:
// Right[<nil>, string](Carsten)
// Right[string](Carsten)
}

View File

@@ -182,10 +182,7 @@ func withCancelCauseFunc[
ma,
IOE.Swap[GIOA, func() E.Either[A, error]],
IOE.ChainFirstIOK[func() E.Either[A, error], func() any](func(err error) func() any {
return IO.MakeIO[func() any](func() any {
cancel(err)
return nil
})
return IO.FromImpure[func() any](func() { cancel(err) })
}),
IOE.Swap[func() E.Either[A, error], GIOA],
)