MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
boost::mpl11::foldl< f, state, structure > Struct Template Reference

Left-associative fold of a structure using a binary operation. More...

#include <boost/mpl11/fwd/foldable.hpp>

Detailed Description

template<typename f, typename state, typename structure>
struct boost::mpl11::foldl< f, state, structure >

Left-associative fold of a structure using a binary operation.

Specifically, returns the result of the successive application of the binary operation f to the result of the previous f invocation (or state for the first application) and every element of the structure in order. For example, if the structure contains x1, x2, ..., xn:

foldl(f, state, structure) == f(...f(f(state, x1), x2)..., xn)
Note
foldl is equivalent to the fold metafunction from the original MPL. However, the order of the arguments has changed.