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

fix: some internal refactorings

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2024-02-06 21:35:33 +01:00
parent 358573cc20
commit 59381c1e50
12 changed files with 96 additions and 43 deletions

View File

@@ -70,7 +70,7 @@ func MonadMap[GA ~func() O.Option[A], GB ~func() O.Option[B], A, B any](fa GA, f
}
func Map[GA ~func() O.Option[A], GB ~func() O.Option[B], A, B any](f func(A) B) func(GA) GB {
return F.Bind2nd(MonadMap[GA, GB, A, B], f)
return optiont.Map(IO.Map[GA, GB, O.Option[A], O.Option[B]], f)
}
func MonadChain[GA ~func() O.Option[A], GB ~func() O.Option[B], A, B any](fa GA, f func(A) GB) GB {