Cosmia
“A monad is a monoid in the category of endofunctors.” Is there something similar for comonad? Hmm, say, comonoid? What does it looks like if there is?
I tried to flip the arrow of monoid, but it looks strange…
And I cannot find any law of it…
maybe … ?
But it’s nearly of no use…
I tried to flip the arrow of monoid, but it looks strange…
class Comonoid a where coidentity :: a -> () comultiple :: a -> (a, a)
And I cannot find any law of it…
maybe … ?
class Comonoid a where v :: a -> () p :: a -> a q :: a -> a forall x. ((p.p) x, (q.p) x , q x) = (p x, (p.q) x, (q.q) x) p x = x q x = x
But it’s nearly of no use…