| Home | Libraries | People | FAQ | More

##### iter_fold

###### Description

Returns the result type of `iter_fold`.

###### Synopsis

    template<
        typename Sequence,
        typename State,
        typename F>
    struct iter_fold
    {
        typedef unspecified type;
    };

Table 1.45. Parameters

Parameter | Requirement | Description
--- | --- | ---
`Sequence` | A model of Forward Sequence | The sequence to iterate
`State` | Any type | The initial state for the first application of `F`
`F` | ``boost::result_of`<F(S,It)>::type` is the return type of `f(s,it)` with current state `s` of type `S`, and an iterator `it` of type `It` on an element of `seq` | The operation to be applied on traversal

###### Expression Semantics

    iter_fold<Sequence, State, F>::type

Return type: Any type

Semantics: Returns the result of applying `iter_fold` to a sequence of type `Sequence`, with an initial state of type `State` and binary function object or function pointer of type `F`.

###### Complexity

Linear, exactly ``result_of::size`<Sequence>::value` applications of `F`.

###### Header

    #include <boost/fusion/algorithm/iteration/iter_fold.hpp>
    #include <boost/fusion/include/iter_fold.hpp>