ResultTypes.jl
ResultTypes.jl copied to clipboard
Add Ref-like broadcast
Currently, broadcasting over e.g. a Vector{<:Result} complains about Base.length(::Result) not defined, as Result is assumed to be an iterator type. Since Result is not an iterator, I believe it would make sense to adapt Base.broadcastable so that we can broadcast on Result containers.
I don't think this requires any tests, but I can add one if you prefer.
EDIT: my bad, broadcasting on a vector containing Results is actually fine. The problem happens when broadcasting with a Result not Refed. I still believe this to be nice to have, though.