Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)dimensional Numeric.Units.Dimensional.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 :: (Traversable t, Monad m) => t (m a) -> m (t a)distribution-opensuse OpenSuse.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 :: (Traversable t, Monad m) => t (m a) -> m (t a)distribution-opensuse OpenSuse.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 :: (Applicative f, HVectorF v, HVector w, ElemsF v ~ Elems w) => v f -> f wfixed-vector-hetero Data.Vector.HFixed Sequence effects for every element in the vector
>>> sequence (mk2F [1,2] "ab" :: HVecF '[Int,Char] []) :: [(Int,Char)] [(1,'a'),(1,'b'),(2,'a'),(2,'b')]
sequence :: StoreInput -> !Word32haskoin-store-data Haskoin.Store.Data No documentation available.
sequence :: StoreInput -> !Word32haskoin-store-data Haskoin.Store.Data No documentation available.
sequence :: BinfoTxInput -> !Word32haskoin-store-data Haskoin.Store.Data No documentation available.
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)pinch Pinch.Internal.FoldList 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 :: Functor f => f (T a) -> T (f a)sample-frame-np Sound.Frame.NumericPrelude.Stereo No documentation available.
sequence :: (IsStream t, MonadAsync m) => t m (m a) -> t m astreamly Streamly.Internal.Data.Stream.IsStream sequence = mapM id
Replace the elements of a stream of monadic actions with the outputs of those actions.>>> drain $ Stream.sequence $ Stream.fromList [putStr "a", putStr "b", putStrLn "c"] abc >>> :{ drain $ Stream.replicateM 3 (return $ threadDelay 1000000 >> print 1) & (fromSerial . Stream.sequence) :} 1 1 1 >>> :{ drain $ Stream.replicateM 3 (return $ threadDelay 1000000 >> print 1) & (fromAsync . Stream.sequence) :} 1 1 1
Concurrent (do not use with fromParallel on infinite streams)