Take this code:
function foo(arg1, arg2, arg3) arg1 + arg2 + arg3 end map(foo, [1;2;3], [4;5;6], 5)
This code is equivalent to
[foo(1, 4, 5)], the other values discarded.
Is this behavior desired for any reason? It doesn’t appear to be documented, and I naively thought that a scalar would be broadcasted.
c was an array, there’s a DimensionMismatch error, so it isn’t as if it always takes the smallest set it can apply.
map(foo, [1;2;3], [4;5;6], 5) throw an error, forcing the user to turn it into an array of the necessary size; or should it broadcast the scalar internally?
Same applies to pmap.
Checked Julia 1.3.0-rc3 as well as 1.2.