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.

  1. subsequences :: IsSequence seq => seq -> [seq]

    mono-traversable Data.Sequences

    subsequences returns a list of all subsequences of the argument.

    > subsequences "abc"
    ["","a","b","ab","c","ac","bc","abc"]
    

  2. isSubsequenceOf :: Eq a => [a] -> [a] -> Bool

    rio RIO.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*
    

  3. subsequences :: [a] -> [[a]]

    rio RIO.List

    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"]
    

  4. bisequence :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b)

    rio RIO.Prelude

    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
    

    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)]
    

  5. bisequence_ :: (Bifoldable t, Applicative f) => t (f a) (f b) -> f ()

    rio RIO.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 bisequence.

    Examples

    Basic usage:
    >>> bisequence_ (print "Hello", print "World")
    "Hello"
    "World"
    
    >>> bisequence_ (Left (print "Hello"))
    "Hello"
    
    >>> bisequence_ (Right (print "World"))
    "World"
    

  6. class HAp h => HSequence (h :: k -> Type -> l -> Type)

    generics-sop Generics.SOP

    A generalization of sequenceA.

  7. hsequence' :: forall (xs :: l) f (g :: k -> Type) . (HSequence h, SListIN h xs, Applicative f) => h (f :.: g) xs -> f (h g xs)

    generics-sop Generics.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)
    

  8. class C sh => ShapeSequence sh

    comfort-array Data.Array.Comfort.Storable.Dim2

    No documentation available.

  9. switchSequence :: ShapeSequence sh => f Zero -> (forall sh0 shs . (C sh0, Eq sh0, ShapeSequence shs) => f (sh0 ::+ shs)) -> f sh

    comfort-array Data.Array.Comfort.Storable.Dim2

    No documentation available.

  10. enumSequenceFrom :: Num a => a -> Sequence a

    math-functions Numeric.Series

    enumSequenceFrom x generate sequence: <math>

Page 53 of many | Previous | Next