Currently the push! function returns the updated S
julia> S = Set();
julia> push!(S, 1)
Set{Any} with 1 element:
1
The returned object is uninformative to a user, since when I need S I can call it out directly
julia> S
Set{Any} with 1 element:
1
Therefore I think devising a new function achieving the following is more meaningful in practice (I guess the implementation can be optimized, thereby opening this issue)
collect!(S, e) = e in S ? false : (push!(S, e); true)
A detailed discussion is at https://discourse.julialang.org/t/receive-the-success-status-of-push-set-element/130988?u=waltermadelim