Hi All,

I’m trying to implement a function which uses the cumulative sum function in stan but I’m running into issues with the basic functionality.

To test the function initially Ive created a simple wrapper using expose stan functions in R.

```
model_code<-'
functions{
real test_cumulative_sum(vector phi, int nseasons){
real cumulative_sum[nseasons];
cumulative_sum = cumulative_sum(phi);
return cumulative_sum
}
}
'
expose_stan_functions(stanc(model_code = model_code))
```

But I keep getting a compilation error.

Any tips on what I am doing wrong here?