What would be the minimal working example of that? This does not work, for example:
a = 2
f = x -> a*x
@show f(1).a
Maybe that is a good opportunity to understand how closures work a little further.
Edit:
This works:
f(a,x) = x -> a*x
@show f(1,2).a
Yet the analogy with the OP example does not seem exact in this case.