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
mep:=haxmap.New[int, string]()
mep.Set(1, "one")
println(mep.Len()) // 1mep.Del(1) // delegate key 1println(mep.Len()) // 0// Still can traverse the key/value pair ?mep.ForEach(func(keyint, valuestring) bool {
fmt.Printf("Key -> %d | Value -> %s\n", key, value)
returntrue
})
// Print: Key -> 1 | Value -> one
I mean, I have deleted key 1, mep.len() is already 0, why ForEach still iterates over the deleted key-value pair? How to actually remove them from mep?
The text was updated successfully, but these errors were encountered:
I mean, I have deleted key 1, mep.len() is already 0, why
ForEach
still iterates over the deleted key-value pair? How to actually remove them frommep
?The text was updated successfully, but these errors were encountered: