August 2018
Intermediate to advanced
380 pages
10h 2m
English
Previously, we saw the version of Monoid that works on all types. A version of Monoid also exists that operates on effect types, that is, on the types of the kind of F[A]. This type class is called MonoidK:

So, as you can see, the method is defined for an effect type, and instead of the combined method that works on two types, A, MonoidK defines a method called combineK, which works on values of type F[A]. Also notice that this method is parametrized by the type A on the method level and not on the level of the type class itself, which means that you can have the single type class defined for some effect type, F[_], and you can use ...