Hoogle Search
Within LTS Haskell 24.36 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
enumSequenceFromStep :: Num a => a -> a -> Sequence amath-functions Numeric.Series enumSequenceFromStep x d generate sequence: <math>
scanSequence :: (b -> a -> b) -> b -> Sequence a -> Sequence bmath-functions Numeric.Series Analog of scanl for sequence.
bisequenceL :: (Bicrosswalk t, Align f) => t (f a) (f b) -> f (t a b)semialign Data.Crosswalk No documentation available.
class HAp h =>
HSequence (h :: k -> Type -> l -> Type)sop-core Data.SOP A generalization of sequenceA.
-
sop-core Data.SOP Corresponds to sequenceA. Lifts an applicative functor out of a structure. Instances:
hsequence', sequence'_NP :: (SListI xs , Applicative f) => NP (f :.: g) xs -> f (NP g xs ) hsequence', sequence'_NS :: (SListI xs , Applicative f) => NS (f :.: g) xs -> f (NS g xs ) hsequence', sequence'_POP :: (SListI2 xss, Applicative f) => POP (f :.: g) xss -> f (POP g xss) hsequence', sequence'_SOP :: (SListI2 xss, Applicative f) => SOP (f :.: g) xss -> f (SOP g xss)
class HAp h =>
HSequence (h :: k -> Type -> l -> Type)sop-core Data.SOP.Classes A generalization of sequenceA.
-
sop-core Data.SOP.Classes Corresponds to sequenceA. Lifts an applicative functor out of a structure. Instances:
hsequence', sequence'_NP :: (SListI xs , Applicative f) => NP (f :.: g) xs -> f (NP g xs ) hsequence', sequence'_NS :: (SListI xs , Applicative f) => NS (f :.: g) xs -> f (NS g xs ) hsequence', sequence'_POP :: (SListI2 xss, Applicative f) => POP (f :.: g) xss -> f (POP g xss) hsequence', sequence'_SOP :: (SListI2 xss, Applicative f) => SOP (f :.: g) xss -> f (SOP g xss)
bisequence :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b)relude Relude.Foldable.Reexport 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_.
bisequence ≡ bitraverse id id
Examples
Basic usage:>>> bisequence (Just 4, Nothing) Nothing
>>> bisequence (Just 4, Just 5) Just (4,5)
>>> bisequence ([1, 2, 3], [4, 5]) [(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)]
bisequence_ :: (Bifoldable t, Applicative f) => t (f a) (f b) -> f ()relude Relude.Foldable.Reexport 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.
Examples
Basic usage:>>> bisequence_ (print "Hello", print "World") "Hello" "World"
>>> bisequence_ (Left (print "Hello")) "Hello"
>>> bisequence_ (Right (print "World")) "World"
-
relude Relude.List.Reexport The subsequences function returns the list of all subsequences of the argument.
Laziness
subsequences does not look ahead unless it must:>>> take 1 (subsequences undefined) [[]] >>> take 2 (subsequences ('a' : undefined)) ["","a"]Examples
>>> subsequences "abc" ["","a","b","ab","c","ac","bc","abc"]
This function is productive on infinite inputs:>>> take 8 $ subsequences ['a'..] ["","a","b","ab","c","ac","bc","abc"]