In the case of lists, foldr, when applied to a binary operator, a
starting value (typically the right-identity of the operator), and a
list, reduces the list using the binary operator, from right to left:

foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)

Note that, since the head of the resulting expression is produced by
an application of the operator to the first element of the list,
foldr can produce a terminating expression from an infinite list.

For a general Foldable structure this should be semantically identical
to,

In the case of lists, foldl, when applied to a binary
operator, a starting value (typically the left-identity of the operator),
and a list, reduces the list using the binary operator, from left to
right:

foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn

Note that to produce the outermost application of the operator the
entire input list must be traversed. This means that foldl' will
diverge if given an infinite list.

Also note that if you want an efficient left-fold, you probably want to
use foldl' instead of foldl. The reason for this is that latter does
not force the "inner" results (e.g. z f x1 in the above example)
before applying them to the operator (e.g. to (f x2)). This results
in a thunk chain O(n) elements long, which then must be evaluated from
the outside-in.

For a general Foldable structure this should be semantically identical
to,

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
list to a single, monolithic result (e.g. length).

For a general Foldable structure this should be semantically identical
to,