There's an issue with the overloaded use of delete! to mean removing both a particular index from a vector and a particular element from a set: vectors partially implement set functions, and some set functions return vectors. See below.
julia> s1 = IntSet(10,12,13);s2 = IntSet(14,15,16);s3 = IntSet();
julia> u = union(union(s1,s2),s3)
IntSet(10, 12, 13, 14, 15, 16)
julia> delete!(u,12)
12
julia> u2 = union(s1,s2,s3)
6-element Any Array:
10
12
13
14
15
16
julia> delete!(u2,12)
ERROR: BoundsError()
in delete! at array.jl:765
This particular case would be fixed by implementing union(s::IntSet,sets::IntSet...) to return an IntSet, but I think the problem is a bit bigger than this.
There's an issue with the overloaded use of
delete!to mean removing both a particular index from a vector and a particular element from a set: vectors partially implement set functions, and some set functions return vectors. See below.This particular case would be fixed by implementing
union(s::IntSet,sets::IntSet...)to return anIntSet, but I think the problem is a bit bigger than this.