darcs patch: Adding isLeft, isRight, fromLeft, fromRight, splitEithers

David House dmhouse at gmail.com
Tue Oct 31 05:23:19 EST 2006


On 30/10/06, Russell O'Connor <roconnor at theorem.ca> wrote:
>  * Adding isLeft, isRight, fromLeft, fromRight, splitEithers

It'd be nice to have the following, too:

lefts :: [Either a b] -> [a]
lefts = fst . splitEithers
rights :: [Either a b] -> [b]
rights = snd . splitEithers

-- 
-David House, dmhouse at gmail.com


More information about the Libraries mailing list