I was expecting to be able to iterate through these grouped dictionaries, but I'm noticing they do not seem to follow the AbstractDict interface. Is this an intentional design decision? If so, is there a benefit to this counterintuitive behavior?
julia> group(iseven, 1:5)
2-element Dictionaries.Dictionary{Bool, Vector{Int64}}
false │ [1, 3, 5]
true │ [2, 4]
julia> Dict(false => [1, 3, 5], true => [2, 4])
Dict{Bool, Vector{Int64}} with 2 entries:
0 => [1, 3, 5]
1 => [2, 4]
julia> collect(group(iseven, 1:5))
2-element Vector{Vector{Int64}}:
[1, 3, 5]
[2, 4]
julia> collect(Dict(false => [1, 3, 5], true => [2, 4]))
2-element Vector{Pair{Bool, Vector{Int64}}}:
0 => [1, 3, 5]
1 => [2, 4]
I was expecting to be able to iterate through these grouped dictionaries, but I'm noticing they do not seem to follow the AbstractDict interface. Is this an intentional design decision? If so, is there a benefit to this counterintuitive behavior?