Struct Encapsulation Question for Optimization Test Set

I don’t know enough about your problem to give a strong suggestion. Often I’d tend to explicitly write out an array of functions, but that assumes each file’s content is fairly short. If not, using include might be the right approach.

I’m not sure I follow. In Julia, there is a distinction between a named function and an anonymous function bound to a name.

julia> f = x -> begin
     y = x + 1
     z = y * 2
     return z^2
end
#1 (generic function with 1 method)

julia> function g(x)
    y = x + 1
    z = y * 2
    return z^2
end
g (generic function with 1 method)

julia> f(1)
16

julia> g(1)
16

Does that address your concern?