1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-11-27 22:28:29 +02:00
Files
fp-go/v2/reader/generic/monoid.go

16 lines
283 B
Go
Raw Normal View History

package generic
import (
M "github.com/IBM/fp-go/v2/monoid"
)
//go:inline
func ApplicativeMonoid[GA ~func(R) A, R, A any](m M.Monoid[A]) M.Monoid[GA] {
return M.ApplicativeMonoid(
Of[GA, R, A],
MonadMap[GA, func(R) func(A) A],
MonadAp[GA, GA, func(R) func(A) A],
m,
)
}