isLeft/isRight (Was: leftToMaybe/rightToMaybe)

Henning Thielemann lemming at henning-thielemann.de
Wed Aug 7 09:18:05 CEST 2013


On Wed, 7 Aug 2013, Erik de Castro Lopo wrote:

> And while we're at it:
>
> isLeft :: Either a b -> Bool
> isLeft (Left _) = True
> isLeft (Right _) = False
>
> isRight :: Either a b -> Bool
> isRight (Left _) = False
> isRight (Right _) = True

http://www.haskell.org/pipermail/libraries/2012-November/018709.html
http://www.haskell.org/pipermail/libraries/2012-December/018716.html




More information about the Libraries mailing list