Hoogle Search
Within LTS Haskell 24.40 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapRight :: (b -> c) -> Either a b -> Either a ceither Data.Either.Combinators The mapRight function takes a function and applies it to an Either value iff the value takes the form Right _. Using Data.Bifunctor:
mapRight = second
Using Control.Arrow:mapRight = (right)
Using Control.Lens:mapRight = over _Right
>>> mapRight (*2) (Left "hello") Left "hello"
>>> mapRight (*2) (Right 4) Right 8
mapException :: (e0 -> e1) -> Exceptional e0 a -> Exceptional e1 aexplicit-exception Control.Monad.Exception.Asynchronous.Lazy No documentation available.
-
explicit-exception Control.Monad.Exception.Asynchronous.Lazy No documentation available.
mapExceptional :: (e0 -> e1) -> (a -> b) -> Exceptional e0 a -> Exceptional e1 bexplicit-exception Control.Monad.Exception.Asynchronous.Lazy No documentation available.
-
explicit-exception Control.Monad.Exception.Asynchronous.Lazy No documentation available.
mapM :: Monad m => (a -> m b) -> Exceptional e a -> m (Exceptional e b)explicit-exception Control.Monad.Exception.Asynchronous.Lazy No documentation available.
mapException :: (e0 -> e1) -> Exceptional e0 a -> Exceptional e1 aexplicit-exception Control.Monad.Exception.Asynchronous.Strict No documentation available.
-
explicit-exception Control.Monad.Exception.Asynchronous.Strict No documentation available.
mapExceptional :: (e0 -> e1) -> (a -> b) -> Exceptional e0 a -> Exceptional e1 bexplicit-exception Control.Monad.Exception.Asynchronous.Strict No documentation available.
-
explicit-exception Control.Monad.Exception.Asynchronous.Strict No documentation available.