1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-11-23 22:14:53 +02:00

fix: simplify type hints

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2025-11-11 15:24:45 +01:00
parent a4e790ac3d
commit 4f8a557072
112 changed files with 355 additions and 356 deletions

View File

@@ -341,7 +341,7 @@ func TestTraverseRecordWithIndex(t *testing.T) {
}
input := map[string]string{"a": "1"}
result := TraverseRecordWithIndex[string](validate)(input)
result := TraverseRecordWithIndex(validate)(input)
expected := Right[error](map[string]string{"a": "a:1"})
assert.Equal(t, expected, result)
}
@@ -658,7 +658,7 @@ func TestAlternativeMonoid(t *testing.T) {
// Test AltMonoid
func TestAltMonoid(t *testing.T) {
zero := func() Either[error, int] { return Left[int](errors.New("empty")) }
m := AltMonoid[error, int](zero)
m := AltMonoid(zero)
result := m.Concat(Left[int](errors.New("err1")), Right[error](42))
assert.Equal(t, Right[error](42), result)