utility-ht-0.0.17: Various small helper functions for Lists, Maybes, Tuples, Functions

Safe Haskell | Safe-Inferred
Language | Haskell98

Data.Either.HT

# Documentation

mapLeft :: (a -> b) -> Either a c -> Either b c Source #

mapRight :: (b -> c) -> Either a b -> Either a c Source #

mapBoth :: (a -> c) -> (b -> d) -> Either a b -> Either c d Source #

maybeLeft :: Either a b -> Maybe a Source #

maybeRight :: Either a b -> Maybe b Source #

swap :: Either a b -> Either b a Source #