2 ms·
Well, yes. You will need to convert your type into something else to use in another monad. As an example, it's common to track failure with an `Either Text` m
by marcosdumay 9y ago
Well, yes.
You will need to convert your type into something else to use in another monad.
As an example, it's common to track failure with an `Either Text` monad, but functions that can fail on a single way usually have an `Maybe a` return type. That means you will probably have an `Text -> Maybe a -> Either Text a` function around and write code like this:
toEither "Error message" $ functionInMaybe a b