Suppose i have a simple function as follows:
julia> func(a;b=3) = a + b
func (generic function with 1 method)
as expected:
julia> func(3,b=5)
8
julia> ex = :(func(3,b=5))
:(func(3,b=5))
julia> eval(ex)
8
julia> ex.args
3-element Array{Any,1}:
:func
3
:(b=5)
julia> ex.args[3]
:(b=5)
However, this doesn't work:
julia> ex.args[3] = :(b=7)
:(b = 7)
Notice, the extra spacing between b,= and 7
julia> ex.args
3-element Array{Any,1}:
:func
3
:(b = 7)
now this doesn't work:
julia> eval(ex)
ERROR: no method func(Int64, Int64)
regards,
Bassem