Creating a struct with symbolic (Symbolics package) functions and variables

Never used Symbolics before, but the expression @variables X[1:50], Symbols_add, Symbols_latex, Symbols_dump is making the macro operate on a tuple of all those, and it’s erroring at trying to reassign the implicitly const function name Symbols_add. It’s covered in the docs but doesn’t cover implicit tuple parentheses, so here’s an example:

julia> macro id(args...) args end
@id (macro with 1 method)

julia> @id 1 2 3 # typical one-liner, 3 Ints
(1, 2, 3)

julia> @id(1, 2, 3) # equivalent call expression
(1, 2, 3)

julia> @id (1, 2, 3) # spacing does one-liner, now 1 tuple
(:((1, 2, 3)),)

julia> @id 1, 2, 3 # still 1 tuple argument
(:((1, 2, 3)),)

To fix the macro call, you would just change to @variables(X[1:50]) or (@variables X[1:50]). But I’m not sure it wouldn’t cause another error, could give it a try.