Inconsistent behavior of map

Why

julia> map(string, 1)
"1"

returns obviously a scalar but

julia> map(string, 'a')
1-element Array{String,1}:
 "a"

returns an 1-dimensional array?

map special-cases when all arguments are numbers. I think this is a consequence of numbers being iterable in Julia. I agree that it is weird.

1 Like