Hoogle Search
Within LTS Haskell 24.3 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
sequence :: Monad m => Pipe (m a) a m rpipes Pipes.Prelude Convert a stream of actions to a stream of values
sequence :: Monad m => Exceptional e (m a) -> m (Exceptional e a)explicit-exception Control.Monad.Exception.Asynchronous.Lazy No documentation available.
sequence :: Monad m => Exceptional e (m a) -> m (Exceptional e a)explicit-exception Control.Monad.Exception.Asynchronous.Strict No documentation available.
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)rio RIO.Prelude Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.
Examples
Basic usage: The first two examples are instances where the input and and output of sequence are isomorphic.>>> sequence $ Right [1,2,3,4] [Right 1,Right 2,Right 3,Right 4]
>>> sequence $ [Right 1,Right 2,Right 3,Right 4] Right [1,2,3,4]
The following examples demonstrate short circuit behavior for sequence.>>> sequence $ Left [1,2,3,4] Left [1,2,3,4]
>>> sequence $ [Left 0, Right 1,Right 2,Right 3,Right 4] Left 0
sequence :: (Monad m, Vector v a, Vector v (m a)) => v (m a) -> m (v a)rio RIO.Vector No documentation available.
sequence :: Monad m => Vector (m a) -> m (Vector a)rio RIO.Vector.Boxed No documentation available.
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)relude Relude.Foldable.Reexport Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.
Examples
Basic usage: The first two examples are instances where the input and and output of sequence are isomorphic.>>> sequence $ Right [1,2,3,4] [Right 1,Right 2,Right 3,Right 4]
>>> sequence $ [Right 1,Right 2,Right 3,Right 4] Right [1,2,3,4]
The following examples demonstrate short circuit behavior for sequence.>>> sequence $ Left [1,2,3,4] Left [1,2,3,4]
>>> sequence $ [Left 0, Right 1,Right 2,Right 3,Right 4] Left 0
sequence :: Monad m => Stream (Of (m a)) m r -> Stream (Of a) m rstreaming Streaming.Prelude Like the sequence but streaming. The result type is a stream of a's, but is not accumulated; the effects of the elements of the original stream are interleaved in the resulting stream. Compare:
sequence :: Monad m => [m a] -> m [a] sequence :: Monad m => Stream (Of (m a)) m r -> Stream (Of a) m r
This obeys the rulesequence :: (Traversable t, Monad m) => t (m a) -> m (t a)base-compat-batteries Control.Monad.Compat Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.
Examples
Basic usage: The first two examples are instances where the input and and output of sequence are isomorphic.>>> sequence $ Right [1,2,3,4] [Right 1,Right 2,Right 3,Right 4]
>>> sequence $ [Right 1,Right 2,Right 3,Right 4] Right [1,2,3,4]
The following examples demonstrate short circuit behavior for sequence.>>> sequence $ Left [1,2,3,4] Left [1,2,3,4]
>>> sequence $ [Left 0, Right 1,Right 2,Right 3,Right 4] Left 0
-
vector-sized Data.Vector.Generic.Sized Evaluate each action and collect the results.