The data could be a struct containing data needed to evaluate model functions. That would avoid closures over variables.
The data could be a struct containing data needed to evaluate model functions.
That would avoid closures over variables.