:: Either a a -> a package:extra

Pull the value out of an Either where both alternatives have the same type.
\x -> fromEither (Left x ) == x
\x -> fromEither (Right x) == x
The fromLeft' function extracts the element out of a Left and throws an error if its argument is Right. Much like fromJust, using this function in polished code is usually a bad idea.
\x -> fromLeft' (Left  x) == x
\x -> fromLeft' (Right x) == undefined
The fromRight' function extracts the element out of a Right and throws an error if its argument is Left. Much like fromJust, using this function in polished code is usually a bad idea.
\x -> fromRight' (Right x) == x
\x -> fromRight' (Left  x) == undefined
Given an Either, convert it to a Maybe, where Left becomes Nothing.
\x -> eitherToMaybe (Left x) == Nothing
\x -> eitherToMaybe (Right x) == Just x