Print.(v) for vector of custom structure?

If you want an array of strings, then you need to call a function that returns a string, e.g.

julia> repr.(v)
2-element Vector{String}:
 "1"
 "2"

Or if you just want the println output, then put a semicolon after the call to suppress the display of the [nothing, nothing] return value:

julia> println.(v);
1
2
2 Likes