    hi(for_each)
    itemization(
        it() Header file: tt(<algorithm>)
        it() Function prototype:
        itemization(
            itt(Function for_each([ExecPol,] ForwardIterator first,
                ForwardIterator last, Function func);)
        )
        it() Description:
        itemization(
            it() The elements reached from the iterator range
rangett(first, last) are passed in sequence as a reference to the function (or
function object) tt(func). The function may modify the elements it receives
(as the used iterator is a forward iterator). Alternatively, if the elements
should be transformed, tt(transform) (see section ref(TRANSFORM)) can be
used. The function itself or a copy of the provided function object is
returned: see the example below, in which an extra argument list is added to
the tt(for_each) call, which argument is eventually also passed to the
function given to tt(for_each). Within tt(for_each) the return value of the
function that is passed to it is ignored. The tt(for_each) generic algorithm
looks a lot like the range-based for loop, but different from the range-based
for-loop the tt(for_each) algorithm can also be used with sub-ranges and with
reverse-iterators.
        )
        it() Example:
        verbinclude(-a examples/foreach.cc)
        it() Here is another example using a function object:
        verbinclude(-a examples/foreachclass.cc)
    )
    The example also shows that the tt(for_each) algorithm may be used with
functions defining tt(const) and non-tt(const) parameters. Also, see section
ref(TRANSFORM) for differences between the tt(for_each) and tt(transform)
generic algorithms.

    The tt(for_each) algorithm cannot directly be used (i.e., by passing
tt(*this) as the function object argument) inside a member function to modify
its own object as the tt(for_each) algorithm first creates its own copy of the
passed function object. A emi(lambda function) or a em(wrapper class) whose
constructor accepts a pointer or reference to the current object and possibly
to one of its member functions solves this problem.
