:: Either a a -> a package:from-sum

Collapse an Either a a to an a. Defined as fromEither id. Note: Other libraries export this function as fromEither, but our fromEither function is slightly more general.
>>> collapseEither (Right 3)
3

>>> collapseEither (Left "hello")
"hello"
Convert an Either to a Maybe. A Right value becomes Just.
>>> eitherToMaybe $ Right 3
Just 3
A Left value becomes Nothing.
>>> eitherToMaybe $ Left "bye"
Nothing