foldr' -package:base
foldr' is a strict variant of foldr
O(n) A strict version of
foldr.
foldr' evaluates as a right-to-left traversal using constant
stack space.
A strict version of
foldr. Each application of
the operator is evaluated before using the result in the next
application. This function is strict in the starting value.
A strict version of
foldr. Each application of
the operator is evaluated before using the result in the next
application. This function is strict in the starting value.
A strict version of
foldr. Each application of
the operator is evaluated before using the result in the next
application. This function is strict in the starting value.
A strict version of
foldr. Each application of
the operator is evaluated before using the result in the next
application. This function is strict in the starting value.
Reduce this map by applying a binary operator to all
elements, using the given starting value (typically the right-identity
of the operator). Each application of the operator is evaluated before
using the result in the next application. This function is strict in
the starting value.
Reduce this set by applying a binary operator to all
elements, using the given starting value (typically the right-identity
of the operator). Each application of the operator is evaluated before
before using the result in the next application. This function is
strict in the starting value.
A strict version of
foldr. Each application of
the operator is evaluated before using the result in the next
application. This function is strict in the starting value.
A strict version of
foldr. Each application of
the operator is evaluated before using the result in the next
application. This function is strict in the starting value.
foldr' is a variant of
foldr that performs strict
reduction from right to left, i.e. starting with the right-most
element. The input structure
must be finite, otherwise
foldr' runs out of space (
diverges).
If you want a strict right fold in constant space, you need a
structure that supports faster than
O(n) access to the
right-most element, such as
Seq from the
containers
package.
This method does not run in constant space for structures such as
lists that don't support efficient right-to-left iteration and so
require
O(n) space to perform right-to-left reduction. Use of
this method with such a structure is a hint that the chosen structure
may be a poor fit for the task at hand. If the order in which the
elements are combined is not important, use
foldl' instead.
O(n). A strict version of
foldr. Each application of the
operator is evaluated before using the result in the next application.
This function is strict in the starting value.
O(n). A strict version of
foldr. Each application of the
operator is evaluated before using the result in the next application.
This function is strict in the starting value.
O(n) Right fold with a strict accumulator
O(n) Right fold with a strict accumulator
O(n) Right fold with a strict accumulator
O(n) Right fold with a strict accumulator
Right-associative fold of a structure, strict in the accumulator. This
is rarely what you want.
Right fold over bytes, strict in the accumulator.