``` c++ SignalT<float> Average = Iterate( Input, 0.0f, [] (int sample, float oldAvg) { return (oldAvg + sample) / 2.0f; }); ``` This does **not** calculate an average. This code calculates  Therefore, the code ``` c++ Sensor mySensor; mySensor.Input << 10 << 5 << 10 << 8; cout << "Average: " << mySensor.Average() << endl; ``` Produces the output ``` Example 4 - Creating stateful signals (2) Average: 7.75 ``` The average of the values (10, 5, 10, 8) is `8.25`, not `7.75`.