Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
streaming Streaming.Prelude A version of mapped that imposes a Functor constraint on the target functor rather than the source functor. This version should be preferred if fmap on the target functor is cheaper.
-
streaming Streaming.Prelude Map layers of one functor to another with a transformation. Compare hoist, which has a similar effect on the monadic parameter.
maps id = id maps f . maps g = maps (f . g)
-
streaming Streaming.Prelude Map layers of one functor to another with a transformation. Compare hoist, which has a similar effect on the monadic parameter.
mapsPost id = id mapsPost f . mapsPost g = mapsPost (f . g) mapsPost f = maps f
mapsPost is essentially the same as maps, but it imposes a Functor constraint on its target functor rather than its source functor. It should be preferred if fmap is cheaper for the target functor than for the source functor. mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)numhask NumHask.Prelude Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.
Examples
mapM is literally a traverse with a type signature restricted to Monad. Its implementation may be more efficient due to additional power of Monad.mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()numhask NumHask.Prelude Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.
mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()numhask NumHask.Prelude Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.
mappend :: Monoid a => a -> a -> anumhask NumHask.Prelude An associative operation NOTE: This method is redundant and has the default implementation mappend = (<>) since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.
mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)ghc-lib-parser GHC.Prelude.Basic Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.
Examples
mapM is literally a traverse with a type signature restricted to Monad. Its implementation may be more efficient due to additional power of Monad.mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()ghc-lib-parser GHC.Prelude.Basic Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.
mappend :: Monoid a => a -> a -> aghc-lib-parser GHC.Prelude.Basic An associative operation NOTE: This method is redundant and has the default implementation mappend = (<>) since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.