Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions base/idset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,6 +21,7 @@ IdSet{Any} with 3 elements:
1.0
1
true
```
"""
mutable struct IdSet{K} <: AbstractSet{K}
list::Memory{Any}
Expand Down