Hoogle Search
Within LTS Haskell 24.49 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapMaybePrimArray :: (Prim a, Prim b) => (a -> Maybe b) -> PrimArray a -> PrimArray bprimitive Data.Primitive.PrimArray Map over a primitive array, optionally discarding some elements. This has the same behavior as Data.Maybe.mapMaybe.
-
primitive Data.Primitive.PrimArray Map over the primitive array, keeping the elements for which the applicative predicate provides a Just.
-
primitive Data.Primitive.PrimArray Map over the primitive array, keeping the elements for which the monadic predicate provides a Just.
mapPrimArray :: (Prim a, Prim b) => (a -> b) -> PrimArray a -> PrimArray bprimitive Data.Primitive.PrimArray Map over the elements of a primitive array.
mapSmallArray' :: (a -> b) -> SmallArray a -> SmallArray bprimitive Data.Primitive.SmallArray Strict map over the elements of the array.
mapConcurrently :: Traversable t => (a -> IO b) -> t a -> IO (t b)async Control.Concurrent.Async Maps an IO-performing function over any Traversable data type, performing all the IO actions concurrently, and returning the original data structure with the arguments replaced by the results. If any of the actions throw an exception, then all other actions are cancelled and the exception is re-thrown. For example, mapConcurrently works with lists:
pages <- mapConcurrently getURL ["url1", "url2", "url3"]
If you just have a list of actions, run them concurrently withresults <- mapConcurrently id [act1, act2, act3]
NOTE: mapConcurrently will immediately spawn a thread for each element of the Traversable, so running this on large inputs can lead to resource exhaustion (of memory, file descriptors, or other limited resources). To avoid unbounded resource usage, see Control.Concurrent.Stream.mapConcurrently_ :: Foldable f => (a -> IO b) -> f a -> IO ()async Control.Concurrent.Async mapConcurrently_ is mapConcurrently with the return value discarded; a concurrent equivalent of mapM_.
mapConcurrently :: Traversable t => (a -> IO b) -> t a -> IO (t b)async Control.Concurrent.Async.Internal Maps an IO-performing function over any Traversable data type, performing all the IO actions concurrently, and returning the original data structure with the arguments replaced by the results. If any of the actions throw an exception, then all other actions are cancelled and the exception is re-thrown. For example, mapConcurrently works with lists:
pages <- mapConcurrently getURL ["url1", "url2", "url3"]
If you just have a list of actions, run them concurrently withresults <- mapConcurrently id [act1, act2, act3]
NOTE: mapConcurrently will immediately spawn a thread for each element of the Traversable, so running this on large inputs can lead to resource exhaustion (of memory, file descriptors, or other limited resources). To avoid unbounded resource usage, see Control.Concurrent.Stream.mapConcurrently_ :: Foldable f => (a -> IO b) -> f a -> IO ()async Control.Concurrent.Async.Internal mapConcurrently_ is mapConcurrently with the return value discarded; a concurrent equivalent of mapM_.
mapConcurrentlyBounded :: Int -> (a -> IO b) -> [a] -> IO [b]async Control.Concurrent.Stream Concurrent map over a list of values, using a bounded number of threads.