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

@@ -123,5 +123,5 @@ func Reduce[A, B any](f func(B, A) B, initial B) func(Option[A]) B {
// Filter converts an optional onto itself if it is some and the predicate is true
func Filter[A any](pred func(A) bool) func(Option[A]) Option[A] {
return Fold(None[A], F.Ternary(pred, Of[A], F.Ignore1[A](None[A])))
return Fold(None[A], F.Ternary(pred, Of[A], F.Ignore1of1[A](None[A])))
}