Let’s create 2 arrays first:
julia> a = rand(100); b = rand(100)
Take identity(a) as an example. These works:
identity(a) .= bidentity(a) .+= b@. $identity(a) += bx = identity(a); @. x = b
But this doesn’t:
julia> @. $identity(a) = b
ERROR: syntax: invalid function name "$identity" around REPL[69]:1
Seems that Julia thinks I’m defining a function called $identity.