"import Fold.applicative" will bring the Applicative instance into scope.
"import Fold.applicative" will bring the Applicative instance into scope. See FoldApplicative.
A Fold that does no work and returns a constant.
A Fold that does no work and returns a constant. Analogous to Function1 const: def const[A, B](b: B): (A => B) = { _ => b }
Simple Fold that collects elements into a container.
A Fold that counts the number of elements satisfying the predicate.
A Fold that returns "true" if any element of the sequence statisfies the predicate.
A Fold that returns "true" if any element of the sequence statisfies the predicate. Note this does not short-circuit enumeration of the sequence.
A Fold that returns the first value in a sequence.
A general way of defining Folds that supports a separate accumulator type.
A general way of defining Folds that supports a separate accumulator type. The accumulator MUST be immutable and serializable.
Turn a common Scala foldLeft into a Fold.
Turn a common Scala foldLeft into a Fold. The accumulator MUST be immutable and serializable.
A general way of defining Folds that supports constructing mutable or non-serializable accumulators.
A Fold that returns "true" if all elements of the sequence statisfy the predicate.
A Fold that returns "true" if all elements of the sequence statisfy the predicate. Note this does not short-circuit enumeration of the sequence.
A Fold that runs the given side effect for every element.
A Fold that returns the last value in a sequence.
A Fold that returns the max value in a sequence.
A Fold that returns the max value in a sequence. (Biased to earlier equal values.)
A Fold that returns a min value in a sequence.
A Fold that returns a min value in a sequence. (Biased to earlier equal values.)
A Fold that returns the product of a numeric sequence.
A Fold that returns the product of a numeric sequence. Does not protect against overflow.
An even simpler Fold that collects into a Seq.
An even simpler Fold that collects into a Seq. Shorthand for "container[I, Seq];" fewer type arguments, better type inferrence.
Fuse a sequence of Folds into one that outputs the result of each.
A Fold that returns the length of a sequence.
A Fold that returns the sum of a numeric sequence.
A Fold that returns the sum of a numeric sequence. Does not protect against overflow.
For a semigroup, if we get more than 0 items, use plus
Methods to create and run Folds.
The Folds defined here are immutable and serializable, which we expect by default. It is important that you as a user indicate mutability or non-serializability when defining new Folds. Additionally, it is recommended that "end" functions not mutate the accumulator in order to support scans (producing a stream of intermediate outputs by calling "end" at each step).