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.

  1. foldlOf :: Getting (Dual (Endo r)) s a -> (r -> a -> r) -> r -> s -> r

    lens Control.Lens.Fold

    Left-associative fold of the parts of a structure that are viewed through a Lens, Getter, Fold or Traversal.

    foldlfoldlOf folded
    
    foldlOf :: Getter s a     -> (r -> a -> r) -> r -> s -> r
    foldlOf :: Fold s a       -> (r -> a -> r) -> r -> s -> r
    foldlOf :: Lens' s a      -> (r -> a -> r) -> r -> s -> r
    foldlOf :: Iso' s a       -> (r -> a -> r) -> r -> s -> r
    foldlOf :: Traversal' s a -> (r -> a -> r) -> r -> s -> r
    foldlOf :: Prism' s a     -> (r -> a -> r) -> r -> s -> r
    

  2. foldlOf' :: Getting (Endo (Endo r)) s a -> (r -> a -> r) -> r -> s -> r

    lens Control.Lens.Fold

    Fold over the elements of a structure, associating to the left, but strictly.

    foldl'foldlOf' folded
    
    foldlOf' :: Getter s a     -> (r -> a -> r) -> r -> s -> r
    foldlOf' :: Fold s a       -> (r -> a -> r) -> r -> s -> r
    foldlOf' :: Iso' s a       -> (r -> a -> r) -> r -> s -> r
    foldlOf' :: Lens' s a      -> (r -> a -> r) -> r -> s -> r
    foldlOf' :: Traversal' s a -> (r -> a -> r) -> r -> s -> r
    

  3. foldlC :: forall (m :: Type -> Type) a b o . Monad m => (a -> b -> a) -> a -> ConduitT b o m a

    conduit Conduit

    A strict left fold.

  4. foldlCE :: forall (m :: Type -> Type) mono a o . (Monad m, MonoFoldable mono) => (a -> Element mono -> a) -> a -> ConduitT mono o m a

    conduit Conduit

    A strict left fold on a chunked stream.

  5. foldl1 :: forall (m :: Type -> Type) a o . Monad m => (a -> a -> a) -> ConduitT a o m (Maybe a)

    conduit Data.Conduit.Combinators

    A strict left fold with no starting value. Returns Nothing when the stream is empty. Subject to fusion

  6. foldlE :: forall (m :: Type -> Type) mono a o . (Monad m, MonoFoldable mono) => (a -> Element mono -> a) -> a -> ConduitT mono o m a

    conduit Data.Conduit.Combinators

    A strict left fold on a chunked stream. Subject to fusion

  7. foldl1S :: forall (m :: Type -> Type) a . Monad m => (a -> a -> a) -> StreamConsumer a m (Maybe a)

    conduit Data.Conduit.Combinators.Stream

    No documentation available.

  8. foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b

    hedgehog Hedgehog.Internal.Prelude

    Left-associative fold of a structure but with strict application of the operator. This ensures that each step of the fold is forced to Weak Head Normal Form before being applied, avoiding the collection of thunks that would otherwise occur. This is often what you want to strictly reduce a finite structure to a single strict result (e.g. sum). For a general Foldable structure this should be semantically identical to,

    foldl' f z = foldl' f z . toList
    

  9. foldl1 :: Foldable t => (a -> a -> a) -> t a -> a

    hedgehog Hedgehog.Internal.Prelude

    A variant of foldl that has no base case, and thus may only be applied to non-empty structures. This function is non-total and will raise a runtime exception if the structure happens to be empty.

    foldl1 f = foldl1 f . toList
    

    Examples

    Basic usage:
    >>> foldl1 (+) [1..4]
    10
    
    >>> foldl1 (+) []
    *** Exception: Prelude.foldl1: empty list
    
    >>> foldl1 (+) Nothing
    *** Exception: foldl1: empty structure
    
    >>> foldl1 (-) [1..4]
    -8
    
    >>> foldl1 (&&) [True, False, True, True]
    False
    
    >>> foldl1 (||) [False, False, True, True]
    True
    
    >>> foldl1 (+) [1..]
    * Hangs forever *
    

  10. foldl1Def :: a -> (a -> a -> a) -> [a] -> a

    safe Safe

    Deprecated: Use foldl1May instead.

Page 34 of many | Previous | Next