JuliaLang/julia — pull request #6548 by one-more-minute (2014-04-16 20:21:39+00:00)
Title: WIP: Promote result array in map

I've added promotion to `map` -- if the next `f(x)` doesn't fit into the result array, the array type is promoted. This will fix examples like `map(join, ["z", "я"])` without affecting performance too much in cases that already work.

There's only one problem: `similar` sometimes creates arrays with undefined values, which breaks `copy` (and therefore `convert`). What's the best way to handle this?

c.f. #210