diff --git a/base/idset.jl b/base/idset.jl index 23f9ca009af0c..c46d49968ff73 100644 --- a/base/idset.jl +++ b/base/idset.jl @@ -5,14 +5,13 @@ IdSet() IdSet{T}() constructs a set (see [`Set`](@ref)) using -`===` as equality with values of type `V`. +`===` as equality with values of type `T`. -In the example below, the values are all `isequal` so they get overwritten. -The `IdSet` compares by `===` so preserves the 3 different keys. - -Examples -≡≡≡≡≡≡≡≡ +In the example below, the values are all `isequal` so they get overwritten in the ordinary `Set`. +The `IdSet` compares by `===` and so preserves the 3 different values. +# Examples +```jldoctest; filter = r"\\n\\s*(1|1\\.0|true)" julia> Set(Any[true, 1, 1.0]) Set{Any} with 1 element: 1.0 @@ -22,6 +21,7 @@ IdSet{Any} with 3 elements: 1.0 1 true +``` """ mutable struct IdSet{K} <: AbstractSet{K} list::Memory{Any}