On Thu, May 30, 2013 at 10:56 PM, Tony Morris <[email protected]> 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
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
