How to infer size of a rolling window using Stan?

It’s possible with if statements and for loops to accidentally write non-differentiable stuff. It can be difficult to debug so you just gotta watch out :P (and void branching on things that are functions of parameters)