Hoogle Search
Within LTS Haskell 24.21 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> bcabal-install-solver Distribution.Solver.Compat.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
foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> bihaskell IHaskellPrelude 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
foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> bincipit-base Incipit.Foldable 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
foldl' :: (r -> v -> r) -> r -> MonoidMap k v -> rmonoidmap-internal Data.MonoidMap.Internal A strict version of foldl. Each application of the operator is evaluated before using the result in the next application. This function is strict in the starting value.
foldl' :: forall (m :: Type -> Type) b a . Monad m => (b -> a -> b) -> b -> Fold m a bstreamly-core Streamly.Data.Fold Make a fold from a left fold style pure step function and initial value of the accumulator. If your Fold returns only Partial (i.e. never returns a Done) then you can use foldl'* constructors. A fold with an extract function can be expressed using fmap:
mkfoldlx :: Monad m => (s -> a -> s) -> s -> (s -> b) -> Fold m a b mkfoldlx step initial extract = fmap extract (foldl' step initial)
foldl' :: Unbox a => (b -> a -> b) -> b -> Array a -> bstreamly-core Streamly.Internal.Data.Array No documentation available.
foldl' :: (b -> a -> b) -> b -> Array a -> bstreamly-core Streamly.Internal.Data.Array.Generic No documentation available.
foldl' :: forall (m :: Type -> Type) b a . Monad m => (b -> a -> b) -> b -> Fold m a bstreamly-core Streamly.Internal.Data.Fold Make a fold from a left fold style pure step function and initial value of the accumulator. If your Fold returns only Partial (i.e. never returns a Done) then you can use foldl'* constructors. A fold with an extract function can be expressed using fmap:
mkfoldlx :: Monad m => (s -> a -> s) -> s -> (s -> b) -> Fold m a b mkfoldlx step initial extract = fmap extract (foldl' step initial)
foldl' :: (MonadIO m, Unbox a) => (b -> a -> b) -> b -> MutArray a -> m bstreamly-core Streamly.Internal.Data.MutArray Strict left fold of an array.
foldl' :: forall (m :: Type -> Type) b a . Monad m => (b -> a -> b) -> Refold m b a bstreamly-core Streamly.Internal.Data.Refold.Type Make a consumer from a left fold style pure step function. If your Fold returns only Partial (i.e. never returns a Done) then you can use foldl'* constructors. See also: Streamly.Data.Fold.foldl' Internal