'Is it possible to save the returned value of a function for the next time it is called?
I'm writing a function that iteratively calculates an integral and for the next estimate I need the previous result.
I'm using an auxiliary variable to store the previous result and it works, but is it possible to do that inside the own function (something similar to SAVE declared variables in fortran)?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
