imagine you have a function f() which receives n parameters and it produces one result.
imagine that you then want to compute f for the same n parameters and another one. if you had kept the previous result the operation would be straight forward and constant in terms of cost.
For example imagine you have the function sum() if I ask sum(1,2,5,4) the answer is 10.
I then ask sum(1,2,5,4 and 3) the answer is 13. but this could be achieved also by 10 + 3 (10 being the previous result)
I want to know if there is a scientific name for the class of functions whose value can be determined by previous input.
I have this problem where if we compute a result for a certain function and then we want to do the same thing and adding a new parameter we still have to recompute everything. That's because this function (differently from sum or average or many others would not belong to this class)
is there any name for this ?
hope I have made myself clear.