Interestingly:

_g(x) = "[" * x * "]"
_g (generic function with 1 method)

@time st2 = map(_g, s)
  0.000044 seconds (11 allocations: 544 bytes)
3-element Array{ASCIIString,1}:
 "[as]"  
 "[sdf]" 
 "[qwer]"

This time map() has even lower footprint then original comprehension.

Jan

>
>>

Reply via email to