Can't access setindex for tuple


I found this function which is exactly what I wanted to do with my simple Tuple:


a = (1, 2)
b = setindex(a, 3, 1)

produces this error:
UndefVarError: setindex not defined

The function is not exported, so you need to prefix it with Base.

julia> x = (1,2,3)
(1, 2, 3)

julia> Base.setindex(x, 4, 3)
(1, 2, 4)

My understanding is that the fact that it’s unexported means that it may be changed in future versions of Julia.