[Haskell-cafe] mapFst and mapSnd
alex.solla at gmail.com
Sat Jun 1 02:18:14 CEST 2013
On Thu, May 30, 2013 at 10:56 PM, Tony Morris <tmorris at tmorris.net> wrote:
> class BinaryFunctor f where
> bimap :: (a -> c) -> (b -> d) -> f a b -> f c d
> mapFst = (`bimap id`)
> mapSnd = bimap id
There's a bifunctors package with:
class Bifunctor f where
bimap :: ...
first :: a -> b -> f a c -> f b c
second :: b -> c -> f a b -> f a c
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe