Open ChrisPenner opened 7 years ago
There's a sensible Monoid for (Representable f, Monoid a) => f a, To mappend two representables we simple mappend the value in each 'slot'. mempty is simply tabulate (const mempty).
(Representable f, Monoid a) => f a
mappend
mempty
tabulate (const mempty)
I found this Monoid quite useful when using Representable for types of discrimination.
I've added this instance for the Co wrapper.
Co
Let me know if there's anything else this would need, or if it's not in line with your ideas.
Thanks for everything you do Edward!
Cheers
There's a sensible Monoid for
(Representable f, Monoid a) => f a
, Tomappend
two representables we simplemappend
the value in each 'slot'.mempty
is simplytabulate (const mempty)
.I found this Monoid quite useful when using Representable for types of discrimination.
I've added this instance for the
Co
wrapper.Let me know if there's anything else this would need, or if it's not in line with your ideas.
Thanks for everything you do Edward!
Cheers