mirror of
https://github.com/IBM/fp-go.git
synced 2025-08-10 22:31:32 +02:00
fix: automate eitherize methods
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
// these functions From 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[R, A any](f func(R) IO.IO[A]) ReaderIO[R, A] {
|
||||
func From0[R, A any](f func(R) IO.IO[A]) func() ReaderIO[R, A] {
|
||||
return G.From0[ReaderIO[R, A]](f)
|
||||
}
|
||||
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
// these functions From 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[GEA ~func(R) GIOA, GIOA ~func() A, R, A any](f func(R) GIOA) GEA {
|
||||
func From0[GEA ~func(R) GIOA, GIOA ~func() A, R, A any](f func(R) GIOA) func() GEA {
|
||||
return G.From0[GEA](f)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user