(a -> m b) -> a -> m c

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> (a -> m c)
base Control.Monad
Right-to-left Kleisli composition of monads. (>=>), with the arguments flipped
(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> (a -> m c)
base Control.Monad
Left-to-right Kleisli composition of monads.
(=<<) :: Monad m => (a -> m b) -> m a -> m b
base Prelude, base Control.Monad
Same as >>=, but with the arguments interchanged.
(>>=) :: Monad m => m a -> (a -> m b) -> m b
base Prelude, base Control.Monad, base Control.Monad.Instances
traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
base Data.Foldable
Map each element of a structure to an action, evaluate these actions from left to right, and ignore the results.
mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
base Data.Foldable
Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results.
mapM_ :: Monad m => (a -> m b) -> [a] -> m ()
base Prelude, base Control.Monad
mapM_ f is equivalent to sequence_ . map f.
bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
base Control.Exception.Base, base Control.Exception
When you want to acquire a resource, do some work with it, and then release the resource, it is a good idea to use bracket, because bracket will install the necessary exception handler to release the resource in the event that an exception is raised during the computation. If an exception is raised, then bracket will re-raise the exception (after performing the release). A common example is opening a file: > bracket > (openFile "filename" ReadMode) > (hClose) > (\fileHandle -> do { ... }) The arguments to bracket are in this order so that we can partially apply it, e.g.: > withFile name mode = bracket (openFile name mode) hClose
bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
base Control.OldException
When you want to acquire a resource, do some work with it, and then release the resource, it is a good idea to use bracket, because bracket will install the necessary exception handler to release the resource in the event that an exception is raised during the computation. If an exception is raised, then bracket will re-raise the exception (after performing the release). A common example is opening a file: > bracket > (openFile "filename" ReadMode) > (hClose) > (\handle -> do { ... }) The arguments to bracket are in this order so that we can partially apply it, e.g.: > withFile name mode = bracket (openFile name mode) hClose
bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
base Control.Exception.Base, base Control.Exception
Like bracket, but only performs the final action if there was an exception raised by the in-between computation.
bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
base Control.OldException
Like bracket, but only performs the final action if there was an exception raised by the in-between computation.
concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
base Data.Foldable
Map a function over all the elements of a container and concatenate the resulting lists.
concatMap :: (a -> [b]) -> [a] -> [b]
base Prelude, base Data.List
Map a function over a list and concatenate the results.
for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
base Data.Foldable
for_ is traverse_ with its arguments flipped.
forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m ()
base Data.Foldable
forM_ is mapM_ with its arguments flipped.
forM_ :: Monad m => [a] -> (a -> m b) -> m ()
base Control.Monad
forM_ is mapM_ with its arguments flipped
withMVar :: MVar a -> (a -> IO b) -> IO b
base Control.Concurrent.MVar
withMVar is a safe wrapper for operating on the contents of an MVar. This operation is exception-safe: it will replace the original contents of the MVar if an exception is raised (see Control.Exception).
withMVar :: MVar a -> (a -> IO b) -> IO b
base GHC.Conc.Sync, base GHC.Conc
bindQ :: Q a -> (a -> Q b) -> Q b
template-haskell Language.Haskell.TH.Syntax
gunfold :: Data a => (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a
base Data.Data

Show more results