The cereal package contains a useful framework for serialising data. I've also noticed that the static pointers extension could be useful for serialising functions, at least those which are statically applied (I understand the caveat that this breaks if the executable is recompiled).

But it occurred to me that I might want to serialise a combination of these two things, for example, a static function call with a number of arguments, but the first of those arguments being non-static data. 

Is there a package to that combines these two use cases, namely static functions with non-static data? I'm happy to start writing one myself, but I don't want to reinvent the wheel.

My ultimate aim is to combine this with acid-state so the current requirement to effectively pre-declare all possible operations on your data is relaxed.