Hoogle Search
Within LTS Haskell 24.32 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapMonotonic :: (a -> b) -> Set a -> Set bcontainers Data.Set The mapMonotonic f s == map f s, but works only when f is strictly increasing. The precondition is not checked. Semi-formally, we have:
and [x < y ==> f x < f y | x <- ls, y <- ls] ==> mapMonotonic f s == map f s where ls = toList s
mapMonotonic :: (a -> b) -> Set a -> Set bcontainers Data.Set.Internal The mapMonotonic f s == map f s, but works only when f is strictly increasing. The precondition is not checked. Semi-formally, we have:
and [x < y ==> f x < f y | x <- ls, y <- ls] ==> mapMonotonic f s == map f s where ls = toList s
mapLift :: (f a -> g a) -> Lift f a -> Lift g atransformers Control.Applicative.Lift Apply a transformation to the other computation.
mapAccum :: ((a, w) -> (b, w)) -> Accum w a -> Accum w btransformers Control.Monad.Trans.Accum Map both the return value and output of a computation using the given function.
mapAccumT :: (m (a, w) -> n (b, w)) -> AccumT w m a -> AccumT w n btransformers Control.Monad.Trans.Accum Map both the return value and output of a computation using the given function.
mapCont :: (r -> r) -> Cont r a -> Cont r atransformers Control.Monad.Trans.Cont Apply a function to transform the result of a continuation-passing computation.
mapExcept :: (Either e a -> Either e' b) -> Except e a -> Except e' btransformers Control.Monad.Trans.Except Map the unwrapped computation using the given function.
mapExceptT :: (m (Either e a) -> n (Either e' b)) -> ExceptT e m a -> ExceptT e' n btransformers Control.Monad.Trans.Except Map the unwrapped computation using the given function.
runExceptT (mapExceptT f m) = f (runExceptT m)
mapMaybeT :: (m (Maybe a) -> n (Maybe b)) -> MaybeT m a -> MaybeT n btransformers Control.Monad.Trans.Maybe Transform the computation inside a MaybeT.
mapRWS :: (Monoid w, Monoid w') => ((a, s, w) -> (b, s, w')) -> RWS r w s a -> RWS r w' s btransformers Control.Monad.Trans.RWS.CPS Map the return value, final state and output of a computation using the given function.