Hi all –

I think I’d like to access the step/iteration number within a Stan program. Is that possible?

The problem is that I run a fixed point iteration at each HMC step. It can be time-consuming,

and using the previous step’s solution as the starting value for the next step would save

a lot of time. Yet I only know how to use the same initial value for each step.

That is, at each step I do something like the following

```
transformed parameters {
vector[N] mstar;
mstar = find_fixed_point(starting_values, model_parameters);
/* what I want to do is
if(iteration == 1) {
mstar = find_fixed_point(starting_values, model_parameters);
} else {
mstar = find_fixed_point(previous_values_of_mstar_from_last_step, model_parameters);
}
*/
}
```

Any tips?