I ran into some surprising bugs recently due to this unexpected behaviour:
julia> d = OrderedDict(1 => :a, 2 => :b, 3 => :c);
julia> filter(iseven, keys(d))
Set{Int64} with 1 element:
2
julia> filter(isodd, keys(d))
Set{Int64} with 2 elements:
3
1
It seems that the problem is that keys(::OrderedDict)::Base.KeySet. KeySet preserves the order, but filter on the KeySet produces a Base.Set.
I think this package should have its own KeySet like type with its own dispatches so it acts correctly in the face of things like filter.