Proposal: add fromRight and fromLeft to Data.Either

Anton Felix Lorenzen anfelor at
Fri May 20 20:08:40 UTC 2016

When working with Either,
I am often missing two simple functions:
fromRight :: Either a b -> b
fromLeft  :: Either a b -> a

It has been implemented a couple of times:

But I don't want to depend on yet another library
for such a basic function.

Could it be added?


More information about the Libraries mailing list