julia> d = Dict("a" => [1, 2, 3], "b" => [1., 2., 3.])
Dict{String, Vector} with 2 entries:
"b" => [1.0, 2.0, 3.0]
"a" => [1, 2, 3]
julia> function filterarrays!(d)
for arr in Any[d["b"], d["a"]]
deleteat!(arr, 2) |> display
end
end
filterarrays! (generic function with 1 method)
julia> display(d)
Dict{String, Vector} with 2 entries:
"b" => [1.0, 2.0, 3.0]
"a" => [1, 2, 3]
julia> filterarrays!(d)
2-element Vector{Float64}:
1.0
3.0
2-element Vector{Int64}:
1
3
julia> display(d)
Dict{String, Vector} with 2 entries:
"b" => [1.0, 3.0]
"a" => [1, 3]
you just use “Any” before [ d[“a”] , d[“b”] ]