1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-11-25 22:21:49 +02:00

fix: automate eitherize methods

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2023-07-18 15:24:00 +02:00
parent 2efe4f64c5
commit eb4975e86d
60 changed files with 2106 additions and 430 deletions

View File

@@ -10,7 +10,7 @@ import (
// these functions curry a golang function with the context as the firsr parameter into a either reader with the context as the last parameter
// this goes back to the advice in https://pkg.go.dev/context to put the context as a first parameter as a convention
func From0[A any](f func(context.Context) IO.IO[A]) ReaderIO[A] {
func From0[A any](f func(context.Context) IO.IO[A]) func() ReaderIO[A] {
return R.From0[ReaderIO[A]](f)
}