Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)cabal-install-solver Distribution.Solver.Compat.Prelude Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.
Examples
Basic usage: For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.>>> sequenceA [Just 1, Just 2, Just 3] Just [1,2,3]
>>> sequenceA [Right 1, Right 2, Right 3] Right [1,2,3]
The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.>>> sequenceA [Just 1, Just 2, Just 3, Nothing] Nothing
>>> sequenceA [Right 1, Right 2, Right 3, Left 4] Left 4
sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()cabal-install-solver Distribution.Solver.Compat.Prelude Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence. sequence_ is just like sequenceA_, but specialised to monadic actions.
-
classy-prelude-conduit ClassyPrelude.Conduit Provide identical input to all of the Conduits and combine their outputs into a single stream. Implemented on top of ZipConduit, see that data type for more details. Since 1.0.17
-
classy-prelude-conduit ClassyPrelude.Conduit Send incoming values to all of the Sink providing, and ultimately coalesce together all return values. Implemented on top of ZipSink, see that data type for more details. Since 1.0.13
-
classy-prelude-conduit ClassyPrelude.Conduit Coalesce all values yielded by all of the Sources. Implemented on top of ZipSource and as such, it exhibits the same short-circuiting behavior as ZipSource. See that data type for more details. If you want to create a source that yields *all* values from multiple sources, use sequence_. Since 1.0.13
sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)incipit-base Incipit.Base Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.
Examples
Basic usage: For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.>>> sequenceA [Just 1, Just 2, Just 3] Just [1,2,3]
>>> sequenceA [Right 1, Right 2, Right 3] Right [1,2,3]
The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.>>> sequenceA [Just 1, Just 2, Just 3, Nothing] Nothing
>>> sequenceA [Right 1, Right 2, Right 3, Left 4] Left 4
sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f ()incipit-base Incipit.Foldable Evaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequenceA. sequenceA_ is just like sequence_, but generalised to Applicative actions.
Examples
Basic usage:>>> sequenceA_ [print "Hello", print "world", print "!"] "Hello" "world" "!"
sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()incipit-base Incipit.Foldable Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence. sequence_ is just like sequenceA_, but specialised to monadic actions.
sequence_ :: MonadParallel m => [m a] -> m ()monad-parallel Control.Monad.Parallel Like sequence_, but executing the actions in parallel.
sequenceT :: Default (Sequence f) a b => a -> f bproduct-profunctors Data.Profunctor.Product.Examples A higher-order generalisation of sequenceA. For example
> sequenceT (print 3110, putStrLn World) :: IO ((), ()) 3110 World ((),())