Relative Content

Tag Archive for scalafunctional-programmingscala-cats

How to change monoid for option of endofunctor?

I want to combine two endofunctors in the context of Option. The combining I want is by composing two endofunctors into one via Category.compose. I found that MonoidK[Endo].algebra[*] instance for Semigroup[Endo[*]] satisfies my requirements. I am using Semigroup[Endo[*]] to make Option be monoidal over Endo.