I would have been surprised if it didn’t work. map!(f, dest, src) is just:
for i in eachindex(src)
dest[i] = f(src[i])
end
AFAIK. An example is always nice, but IMHO there’s a missing method map!(f, iter) = map!(f, iter, iter) which would make it obvious that it does work.
That’s a great idea, but given that the semantics is different from the current map!, perhaps a different name would be preferable. Also, there is no reason it can’t take multiple arguments, and just write into the first one.