Hoogle Search
Within LTS Haskell 24.45 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapStateT :: (m (a, s) -> n (b, s)) -> StateT s m a -> StateT s n bmonads-tf Control.Monad.State.Strict Map both the return value and final state of a computation using the given function.
mapWriter :: ((a, w) -> (b, w')) -> Writer w a -> Writer w' bmonads-tf Control.Monad.Writer.Lazy Map both the return value and output of a computation using the given function.
mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n bmonads-tf Control.Monad.Writer.Lazy Map both the return value and output of a computation using the given function.
runWriterT (mapWriterT f m) = f (runWriterT m)
mapWriter :: ((a, w) -> (b, w')) -> Writer w a -> Writer w' bmonads-tf Control.Monad.Writer.Strict Map both the return value and output of a computation using the given function.
mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n bmonads-tf Control.Monad.Writer.Strict Map both the return value and output of a computation using the given function.
runWriterT (mapWriterT f m) = f (runWriterT m)
mapAccumL :: MonoidNull v2 => (s -> v1 -> (s, v2)) -> s -> MonoidMap k v1 -> (s, MonoidMap k v2)monoidmap Data.MonoidMap Threads an accumulating argument through the map in ascending order of keys. Satisfies the following property:
mapAccumL f s m == fmap fromMap (Traversable.mapAccumL f s (toMap m))
-
monoidmap Data.MonoidMap Threads an accumulating argument through the map in ascending order of keys. Satisfies the following property:
mapAccumLWithKey f s m == fmap fromMap (Map.mapAccumWithKey f s (toMap m))
mapAccumR :: MonoidNull v2 => (s -> v1 -> (s, v2)) -> s -> MonoidMap k v1 -> (s, MonoidMap k v2)monoidmap Data.MonoidMap Threads an accumulating argument through the map in descending order of keys. Satisfies the following property:
mapAccumR f s m == fmap fromMap (Traversable.mapAccumR f s (toMap m))
-
monoidmap Data.MonoidMap Threads an accumulating argument through the map in descending order of keys. Satisfies the following property:
mapAccumRWithKey f s m == fmap fromMap (Map.mapAccumRWithKey f s (toMap m))
mapKeys :: (Ord k2, MonoidNull v) => (k1 -> k2) -> MonoidMap k1 v -> MonoidMap k2 vmonoidmap Data.MonoidMap Applies a function to all the keys of a MonoidMap that are associated with non-null values. If the resultant map would contain more than one value for the same key, values are combined together in ascending key order with the (<>) operator. Satisfies the following property for all possible keys k:
get k (mapKeys f m) == foldMap (`get` m) (filter ((==) k . f) (nonNullKeys m))