Broadcasting with functions of structs

The @. will transform update(var) to update.(var), which is not what you want. Just put the . on the += where you want it: myarray .+= update(var)