reduceLeft top-level constant

B Function(ImmutableList<T>) Function(B (B, T)) Function<T, B>(B empty) const reduceLeft

An alias for the foldLeft function.

reduceLeft serves the same purpose and functionality as foldLeft. In some programming contexts or traditions, "reduce" might be more familiar or intuitive than "fold". By providing an alias, users can use the term they are more comfortable with.

Usage:

var result = reduceLeft(myList, initialValue, myFunction);

Note: Ensure that the functionality and behavior of foldLeft is well-documented since reduceLeft is directly referencing it.

Implementation

const reduceLeft = foldLeft;