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 :: (IsStream t, MonadAsync m) => t m (m a) -> t m astreamly Streamly.Prelude 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)sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)classy-prelude-yesod ClassyPrelude.Yesod 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
-
constrained-categories Control.Category.Constrained.Prelude No documentation available.
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)constrained-categories Control.Category.Hask 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
-
constrained-categories Control.Monad.Constrained No documentation available.
-
constrained-categories Data.Traversable.Constrained No documentation available.
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)copilot-language Copilot.Language.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 :: Event -> Maybe Int32gogol-apps-calendar Gogol.AppsCalendar Sequence number as per iCalendar.
sequence :: Event -> Maybe Int32gogol-apps-calendar Gogol.AppsCalendar.Types Sequence number as per iCalendar.
sequence :: CreativeAssignment -> Maybe Int32gogol-dfareporting Gogol.DFAReporting Sequence number of the creative assignment, applicable when the rotation type is CREATIVEROTATIONTYPE_SEQUENTIAL. Acceptable values are 1 to 65535, inclusive.