Contains definition of the ``proto::fold<>`` and ``proto::reverse_fold<>`` transforms.

proto::transform
< fold<Sequence, State0, Fun> >
A PrimitiveTransform that invokes the `fusion::fold<>` algorithm to accumulate a value.

For the complete description of the behavior of the `proto::fold<>` transform, see the documentation for the nested ``proto::fold::impl<>`` class template.

proto::transform_impl
< Expr, State, Data >
For exposition only
`when`<`_`, Sequence>
For exposition only
`when`<`_`, State0>
A Fusion sequence, for exposition only
typename boost::result_of<X(Expr, State, Data)>::type
An initial state for the fold, for exposition only
typename boost::result_of<Y(Expr, State, Data)>::type
fun(d)(s,e) == when<_,Fun>()(e,s,d)
unspecified
typename fusion::result_of::fold<seq, state0, fun>::type
result_type `typename impl::expr_param

The current expression

` `typename impl::state_param

The current state

` `typename impl::data_param

An arbitrary data

`

Let `seq` be ``when`<`_`, Sequence>()(expr, state, data)`, let `state0` be ``when`<`_`, State0>()(expr, state, data)`, and let `fun(data)` be an object such that `fun(data)(state, expr)` is equivalent to ``when`<`_`, Fun>()(expr, state, data)`. Then, this function returns `fusion::fold(seq, state0, fun(data))`.

proto::fold
< `proto::_reverse`(Sequence), State0, Fun >
A PrimitiveTransform that is the same as the ``proto::fold<>`` transform, except that it folds back-to-front instead of front-to-back. It uses the ``proto::_reverse`` callable PolymorphicFunctionObject to create a `fusion::reverse_view<>` of the sequence before invoking `fusion::fold<>`.