For 0.6, see Broadcast for custom type - #3 by fengyang.wang for how to implement broadcast for a custom type. Note that a lot changes to broadcast[!]
are coming in 0.7/1.0:
-
https://github.com/JuliaLang/julia/pull/23939 (improve ability to extend
broadcast
and properly document the process) -
https://github.com/JuliaLang/julia/pull/24992 (improve ability to extend
broadcast!
and avoid ambiguities between packages in similar fashion) - https://github.com/JuliaLang/julia/pull/23692