Proposal: add fromRight and fromLeft to Data.Either

Erik de Castro Lopo mle+hs at mega-nerd.com
Sun Jun 12 06:29:29 UTC 2016


Anton Felix Lorenzen wrote:

> 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:
> http://hayoo.fh-wedel.de/?query=fromRight
> 
> But I don't want to depend on yet another library
> for such a basic function.
> 
> Could it be added?

-1 on the addition of yet another partial function.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the Libraries mailing list