ResultTypes.jl icon indicating copy to clipboard operation
ResultTypes.jl copied to clipboard

Add Ref-like broadcast

Open serenity4 opened this issue 4 years ago • 0 comments

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.

serenity4 avatar Feb 27 '21 20:02 serenity4