Hoogle Search
Within LTS Haskell 24.28 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])LambdaHack Game.LambdaHack.Core.Prelude The mapAndUnzipM function maps its first argument over a list, returning the result as a pair of lists. This function is mainly used with complicated data structures or a state monad.
mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)LambdaHack Game.LambdaHack.Core.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 :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)LambdaHack Game.LambdaHack.Core.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 ()) -> t a -> m ()LambdaHack Game.LambdaHack.Core.Prelude This has a more specific type (unit result) than normally, to catch errors.
mappend :: Monoid a => a -> a -> aLambdaHack Game.LambdaHack.Core.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.
mapActorCStore_ :: MonadServer m => CStore -> (ItemId -> ItemQuant -> m ()) -> Actor -> m ()LambdaHack Game.LambdaHack.Server.ItemM Mapping over actor's items from a give store.
mapFromFuns :: Ord b => [a] -> [a -> b] -> Map b aLambdaHack Game.LambdaHack.Server.StartM No documentation available.
mapL :: List l => (a -> ItemM l b) -> l a -> l bList Data.List.Class No documentation available.
mapMaybe :: List l => (a -> Maybe b) -> l a -> l bList Data.List.Class No documentation available.
mapInside :: CanMapInside dom e => dom -> e -> eaern2-mp AERN2.MP.Enclosure Return some value contained in dom. The returned value does not have to equal the given e even if e is already inside dom. All elements of dom should be covered with roughly the same probability when calling this function for evenly distributed e's. This function is intended mainly for generating values inside dom for randomised tests.