Open
Description
a = Vector{Function}(undef, 5)
for i in 1:5
a[i](t) = cos(i*t)
end
ERROR: syntax: invalid function name "a[i]" around
https://discourse.julialang.org/t/vector-of-functions/94811
This error says what the problem is and where, but not how to solve it, which is to use an anonymous function a[i] = t -> cos(i*t)
.
If there is tooling to help generate this kind of message that would be helpful.