
19 Apr
2014
19 Apr
'14
6:21 a.m.
On 2014-04-18 at 22:54:18 +0200, Tobias Florek wrote:
i propose to include the following functions into Data.Either.
mapLeft :: (a->b) -> Either a c -> Either b c mapLeft f = bimap f id
bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d bimap f g = either (Left . f) (Right . g)
as these are just specialized versions of existing functions, i.e. mapLeft = Control.Arrow.left bimap = Control.Arrow.(+++) I'm not convinced we should add these