Dictionaries.jl
Dictionaries.jl copied to clipboard
Missing methods for some set operations between `AbstractIndices` and `itr`
An example with setdiff:
julia> d1 = Indices(["A","B","C"]);
julia> c1 = ["B","C","D"];
julia> setdiff(d1, c1)
ERROR: MethodError: no method matching setdiff!(::Indices{String}, ::Vector{String})
Similarly with intersect
julia> intersect(d1, c1)
ERROR: MethodError: no method matching intersect!(::Indices{String}, ::Vector{String})
I would expect these operations to return an Indices{String} with the result, which would be consistent with the behaviour of union
julia> union(d1, c1)
4-element Indices{String}
"A"
"B"
"C"
"D"
Right - this does seem like something we can and should fix, using the same dispatch pattern as Base does.