When the advance method is called, the function is asked to perform the next step of its computation.
The original function must not be altered during that step (or more correctly, calling advance on the original expression again must not return a different result).
@return a copy of the function containing the new state.