This probably was discussed before but I can’t find anything. Does it make sense to allow undefined high order functions? Something like:
functions{
matrix foo(func bar, vector x);
matrix bar(vector x);
#include "foobar_impl.hpp" // let's assume we can include hpp
}
model {
vector b;
matrix a = foo(bar, b);
}
It implies we need to
- allow including hpp like what one can do in rstan
- allow new type “func”
I think doing this helps when someone wants to retrofit sophisticated c/c++ functions and use them in Stan.