fold package:mono-traversable
Monomorphic containers that can be folded.
Monoidally combine all values in the container
A monadic strict left fold, together with an unwrap function.
Similar to foldlUnwrap, but allows monadic actions. To be
used with impurely from foldl.
Map each element of a monomorphic container to a
Monoid and
combine the results.
Map each element of a monomorphic container to a
Monoid and
combine the results.
Map each element of a monomorphic container to a semigroup, and
combine the results.
Note: this is a partial function. On an empty
MonoFoldable, it
will throw an exception.
See ofoldMap1 from Data.NonNull for a total version
of this function.
Strict left-associative fold of a monomorphic container.
Strict left-associative fold of a monomorphic container.
Strict left-associative fold of a monomorphic container with no base
element.
Note: this is a partial function. On an empty
MonoFoldable, it
will throw an exception.
See ofoldl1' from Data.NonNull for a total version of
this function.
Strict left-associative fold of a monomorphic container with no base
element.
Note: this is a partial function. On an empty
MonoFoldable, it
will throw an exception.
See ofoldl1' from Data.NonNull for a total version of
this function.
Monadic fold over the elements of a monomorphic container, associating
to the left.
A strict left fold, together with an unwrap function.
This is convenient when the accumulator value is not the same as the
final expected type. It is provided mainly for integration with the
foldl package, to be used in conjunction with
purely.
Right-associative fold of a monomorphic container.
Right-associative fold of a monomorphic container.
Right-associative fold of a monomorphic container with no base
element.
Note: this is a partial function. On an empty
MonoFoldable, it
will throw an exception.
See ofoldr1 from Data.NonNull for a total version of
this function.