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

fix: generate sequenceT

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2023-07-13 22:24:04 +02:00
parent a18a04ce39
commit 177979354c
23 changed files with 1424 additions and 123 deletions

View File

@@ -131,7 +131,7 @@ func FromOption[E, A any](onNone func() E) func(O.Option[A]) Either[E, A] {
}
func ToOption[E, A any]() func(Either[E, A]) O.Option[A] {
return Fold(F.Ignore1[E](O.None[A]), O.Some[A])
return Fold(F.Ignore1of1[E](O.None[A]), O.Some[A])
}
func FromError[A any](f func(a A) error) func(A) Either[error, A] {
@@ -182,7 +182,7 @@ func Reduce[E, A, B any](f func(B, A) B, initial B) func(Either[E, A]) B {
}
func AltW[E, E1, A any](that func() Either[E1, A]) func(Either[E, A]) Either[E1, A] {
return Fold(F.Ignore1[E](that), Right[E1, A])
return Fold(F.Ignore1of1[E](that), Right[E1, A])
}
func Alt[E, A any](that func() Either[E, A]) func(Either[E, A]) Either[E, A] {

View File

@@ -1,6 +1,6 @@
// Code generated by go generate; DO NOT EDIT.
// This file was generated by robots at
// 2023-07-13 17:33:41.4844284 +0200 CEST m=+0.009082001
// 2023-07-13 22:20:17.8012235 +0200 CEST m=+0.012514201
package either

View File

@@ -1,7 +1,7 @@
package either
import (
Apply "github.com/ibm/fp-go/apply"
Apply "github.com/ibm/fp-go/internal/apply"
T "github.com/ibm/fp-go/tuple"
)