Cardano.Internal.Compat
fromRight :: b -> Either a b -> b Source #
Return the contents of a Right -value or a default value otherwise.
Right
Basic usage:
>>> fromRight 1 (Right 3) 3 >>> fromRight 1 (Left "foo") 1
>>>
fromRight 1 (Right 3)
fromRight 1 (Left "foo")
Since: base-4.10.0.0