I’m working on a project trying to use `@formula`

in a fairly novel way, for example, if I wanted to use `GLM.jl`

to fit a linear model with two predictors and their interaction I would use something like this:

```
f = @formula(y ~ 1 + x_1*x_2)
model = glm(f, data, Normal(), IdentityLink())
```

Assuming I have a vector `β`

prespecified, what I would like to do is be able to extract the regression equation out of `f`

so that I could get a function that behaved like:

```
function f!(y::T, x_1::T, x_2::T, β::Vector{T}) where {T<:Real}
y = β[1] + β[2] * x_1 + β[3] * x_2 + β[4] * x_1 * x_2
return y
end
```

I need to do this so that I can have a function in terms of the predictors and the regression coefficients `β`

that I can pass to automatic differentiation tools like `ForwardDiff`

. I’m not even sure if this is possible using `StatsModels`

and Terms 2.0. If anyone had any idea about how to implement this I would be excited to see!