julia> tl = [(1,2), ("a", "b")]
2-element Array{(Any,Any),1}:
 (1,2)    
 ("a","b")


julia> map(first, tl)
ERROR: no method convert(Type{Int64}, ASCIIString)
 in setindex! at array.jl:338
 in map_to! at abstractarray.jl:1353
 in map at abstractarray.jl:1362



Is this by design? One would expect the above map to just return an Array 
of Any, as does

julia> [x[1] for x in tl]

2-element Array{Any,1}:
 1   
  "a"



which(map, first, tl) lists :
map(f::Union(Function,DataType),A::AbstractArray{T,N}) at abstractarray.jl:
1359


which creates an array similar to the first element.



Reply via email to