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 [email protected] but it seem to be
closed group.
_______________________________________________
ghc-devs mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to