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.
sequenceIdOutputStream :: Integral s => s -> (s -> a -> b) -> OutputStream b -> IO (OutputStream a)seqid-streams System.IO.Streams.SequenceId Wrap an OutputStream to give a sequence ID for each element written. Example:
(outStream', getSeqId) <- sequenceIdOutputStream 1 outStream return $ contramapM (addSeqId getSeqId) outStream'
sequenceT :: SequenceT a b => a -> btuple Data.Tuple.Sequence No documentation available.
sequenceATuple :: Int -> Q Exptuple-th TupleTH Like sequenceA.
-
tuple-th TupleTH Like sequence.
sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)verset Verset 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 ()verset Verset 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" "!"
sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)xmonad-contrib XMonad.Config.Prime 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 ()xmonad-contrib XMonad.Config.Prime 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.
sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f ()xmonad-contrib XMonad.Prelude 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" "!"
isSubsequenceOf :: Eq a => [a] -> [a] -> Boolbase Data.List The isSubsequenceOf function takes two lists and returns True if all the elements of the first list occur, in order, in the second. The elements do not have to occur consecutively. isSubsequenceOf x y is equivalent to x `elem` (subsequences y). Note: isSubsequenceOf is often used in infix form.
Examples
>>> "GHC" `isSubsequenceOf` "The Glorious Haskell Compiler" True
>>> ['a','d'..'z'] `isSubsequenceOf` ['a'..'z'] True
>>> [1..10] `isSubsequenceOf` [10,9..0] False
For the result to be True, the first list must be finite; for the result to be False, the second list must be finite:>>> [0,2..10] `isSubsequenceOf` [0..] True
>>> [0..] `isSubsequenceOf` [0,2..10] False
>>> [0,2..] `isSubsequenceOf` [0..] * Hangs forever*