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

fix: add missing TraverseArraySeq

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2023-11-27 20:52:02 +01:00
parent ffd9418cac
commit 3d54f99739
5 changed files with 591 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
package generic
import (
F "github.com/IBM/fp-go/function"
G "github.com/IBM/fp-go/internal/apply"
)
@@ -27,7 +28,10 @@ const (
// MonadApSeq implements the applicative on a single thread by first executing mab and the ma
func MonadApSeq[GA ~func() A, GB ~func() B, GAB ~func() func(A) B, A, B any](mab GAB, ma GA) GB {
return MakeIO[GB](func() B {
return mab()(ma())
return F.Pipe1(
ma(),
mab(),
)
})
}