
31 Oct
2006
31 Oct
'06
6:18 a.m.
Hello David, Tuesday, October 31, 2006, 1:23:19 PM, you 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
i think that this may be faster: lefts = filter isLeft rights = filter isRight -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com