sequence package:rio

Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.
Evaluate each action and collect the results
Evaluate each action and collect the results
Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.
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.
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. As of base 4.8.0.0, sequence_ is just sequenceA_, specialized to Monad.
Evaluate each action and discard the results
Evaluate each action and discard the results
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 elem x (subsequences y).

Examples

>>> isSubsequenceOf "GHC" "The Glorious Haskell Compiler"
True

>>> isSubsequenceOf ['a','d'..'z'] ['a'..'z']
True

>>> isSubsequenceOf [1..10] [10,9..0]
False
The subsequences function returns the list of all subsequences of the argument.
>>> subsequences "abc"
["","a","b","ab","c","ac","bc","abc"]
Sequences all the actions in a structure, building a new structure with the same shape using the results of the actions. For a version that ignores the results, see bisequence_.
bisequencebitraverse id id
Evaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results, see bisequence.