Broadcasting over structs in 1.0: what am I supposed to do?

julia> Broadcast.broadcastable(m::M) = Ref(m)

julia> f.(m,y)
3-element Array{Float64,1}:
 1.0
 2.0
 3.0

See help on broadcastable and https://docs.julialang.org/en/latest/manual/interfaces/#man-interfaces-broadcasting-1 for further information.

7 Likes