Either
type
stripLeft :: a ⊕ b -> Maybe a stripRight :: a1 ⊕ a2 -> Maybe a2 stripEither :: a ⊕ a -> a filterLeft :: [b1 ⊕ b2] -> [b1] filterRight :: [a ⊕ b] -> [b] isLeft :: a ⊕ b -> Bool isRight :: a ⊕ b -> Bool mapEither :: (t1 -> a) -> (t2 -> b) -> t1 ⊕ t2 -> a ⊕ b swapEither :: b ⊕ a -> a ⊕ b splitEitherList :: [a1 ⊕ a2] -> ([a1], [a2]) fromLeft :: a ⊕ b -> a fromRight :: a ⊕ b -> b
Note that in many places in the documentation we write
a+b
or a⊕b
as an abbreviation of Either a b
.