I was wondering if we have facilities (some singleton or similar) which allows immutable storage of the user input data in shapes more suitable for individual functions.
The idea is simple: The user passes in the data into Stan programs as he has to given our functions. Now, the functions then have to take the input data and possibly reformat it or maybe derive quantities from this. Currently, these operations which act on user data will have to be redone every-time the function is called despite the fact that the user data never changes. These manipulations are certainly cheap compared to all the rest which is going on, but avoiding this should be possible by, for example, letting functions register and save the transformed data operations somewhere.
This concept is also known as memoization as far as I am aware. Do we have this? Should we have this? Is it easy?