
9 Dec
2012
9 Dec
'12
9:01 a.m.
On 12/7/12 1:01 PM, Edward Kmett wrote:
On Fri, Dec 7, 2012 at 12:45 PM, Ross Paterson
wrote: The either package has mapEitherT as the binary map
mapEitherT :: Functor m => (e -> f) -> (a -> b) -> EitherT e m a -> EitherT f m b
but consistency with the rest of transformers would apply this name to
mapEitherT :: (m (Either e a) -> n (Either e' b)) -> EitherT e m a -> EitherT e' n b mapEitherT f m = EitherT $ f (runEitherT m)
Something that provides the existing 'mapEitherT' functionality would be nice to retain as it gets used in multiple packages. Perhaps bikeshed it to 'bimapEitherT', and use 'mapEitherT' for your notion?
+1 for bimapEitherT -- Live well, ~wren