
10 Mar
2017
10 Mar
'17
5:25 p.m.
There originally seems like there shouldn't be one, because it's impossible to, for any permutation of the arguments of (>>=), get the covariances/contravariances right on the arguments. However, based on the fact that there is a mapping: a -> ((a -> r) -> r) and what seems like an isomorphism: (a -> r) -> (((a -> r) -> r) -> r) (((a -> r) -> r) -> r) -> (a -> r) then this looks like it might be some kind of monad-like structure: class Contravariant f => Contramonad f where contrareturn :: a -> f (f a) contrabind :: (a -> f (f b)) -> f b -> f a I have no idea what the laws should be for it, though. So is this worth pursuing, or have I just stumbled down a blind alley?