How do you define a mutating function in Julia, where you want the result to be written to one of it\'s inputs.
I know functions exist like push!(list, a),
push!(list, a)
For a struct type, you can use setfield!(value, name::Symbol, x) and getfield(value, name::Symbol) inside a function.
setfield!(value, name::Symbol, x)
getfield(value, name::Symbol)
When you call the function, you need to pass the struct obj/name (value) and the field symbol (name). (x) is the new value for the struct field.