\a b -> maybeToEither a (Just b) == Right b \a -> maybeToEither a Nothing == Left a
>>> maybeToRight "default" (Just 12) Right 12
>>> maybeToRight "default" Nothing Left "default"
>>> maybeToEither 3 $ Just "hello" Right "hello"
>>> maybeToEither 3 Nothing Left 3
>>> maybeToRight True (Just "aba") Right "aba" >>> maybeToRight True Nothing Left True
>>> maybeToEitherOr (Just "hello") 3 Right "hello"
>>> maybeToEitherOr Nothing 3 Left 3