Open mcabbott opened 1 year ago
With #174, and in particular the use of mapvalue
instead of map
, the situation has improved although it is not fixed yet.
julia> d = Dict(
:a => Dict(
:b => Dict(
:c => [1.],
:d => [2.],
),
:e => 3.,
),
:f => [4.],
)
Dict{Symbol, Any} with 2 entries:
:a => Dict{Symbol, Any}(:b=>Dict(:d=>[2.0], :c=>[1.0]), :e=>3.0)
:f => [4.0]
julia> ps, re = destructure(d)
([2.0, 1.0, 4.0], Restructure(Dict, ..., 3))
julia> re(ps)
2-element Vector{Pair{Symbol}}:
:a => Pair{Symbol}[:b => [:d => [2.0], :c => [1.0]], :e => 3.0]
:f => [4.0]
destructure
usesmap
, I think from before support for Dict was added elsewhere, hence this fails: