You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
deep_remove removes keys that exist if final key does not exist聽#1
Here I want to remove a non-existent k5 but because k2 doesn't contain a k3, it's removed instead!
The actual example I tried was this:
%% same Msg as above
mapz:deep_remove([k,k1,k3,k4,k5], Msg).
#{k => #{k1 => #{k2 => value,k3 => #{},k4 => 333}}}
k3 contains a k4 but as k.k1.k3.k4 is not a map but a value (and does not contain a k5), k4 is removed instead of doing nothing - which I would assume to be the case for a non-existent path?
And the third example:
mapz:deep_remove([k,k33,k3,k4,k5], Msg).
${}
I can wipe my entire map by using a incorrect second key! :sadface:
Activity