julia> f(x) = x; g(x) = 2x; h(x) = 3x
h (generic function with 1 method)
julia> x = 1
1
julia> for ϕ in (f, g, h)
@show ϕ(x)
end
ϕ(x) = 1
ϕ(x) = 2
ϕ(x) = 3
julia> ϕ = [f, g, h]
3-element Vector{Function}:
f (generic function with 1 method)
g (generic function with 1 method)
h (generic function with 1 method)
julia> for i in 1:3
@show ϕ[i](x)
end
(ϕ[i])(x) = 1
(ϕ[i])(x) = 2
(ϕ[i])(x) = 3