
5 Jul
2018
5 Jul
'18
9:36 a.m.
Hi! Just searched for a `bimap` variant that simultaneously transforms both components with the same morphism: ``` haskell diag :: Bifunctor p => (a -> b) -> p a a -> p b b diag f = bimap f f ``` I did not find any. Would it make sense to add it? Cheers, Gabor PS: same for profunctors: ``` haskell xmap :: Profunctor p => (a -> b) -> p b a -> p a b ``` PPS: I would have sent this to libraries@haskell.org but it seem to be closed group.