1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-06-23 00:27:49 +02:00
Files
fp-go/number/monoid.go

14 lines
243 B
Go
Raw Normal View History

package number
import (
M "github.com/IBM/fp-go/monoid"
)
func MonoidSum[A int | int8 | int16 | int32 | int64 | float32 | float64 | complex64 | complex128]() M.Monoid[A] {
s := SemigroupSum[A]()
return M.MakeMonoid(
s.Concat,
0,
)
}