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

Merge pull request #75 from pinguo-lixin/fix-magma-reverse

fix: magma.Reverse
This commit is contained in:
Carsten Leue
2023-11-05 20:13:42 +01:00
committed by GitHub

View File

@@ -33,7 +33,7 @@ func MakeMagma[A any](c func(A, A) A) Magma[A] {
func Reverse[A any](m Magma[A]) Magma[A] { func Reverse[A any](m Magma[A]) Magma[A] {
return MakeMagma(func(x A, y A) A { return MakeMagma(func(x A, y A) A {
return m.Concat(y, y) return m.Concat(y, x)
}) })
} }