number of key/value pairs - O(1)
tupled form of insert
alias for delete
if the key exists, transforms its value - O(log n)
like adjust but with the key available in the transformation - O(log n)
removes a key/value pair - O(log n)
inserts a new key/value - O(log n).
inserts a new key/value - O(log n).
If the key is already present, its value is replaced by the provided value.
inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)
inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)
function to resolve conflict with existing key: (insertedValue, existingValue) => resolvedValue
key
value to insert if the key is not already present
inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)
inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)
function to resolve conflict with existing key: (key, insertedValue, existingValue) => resolvedValue
key
value to insert if the key is not already present
returns true if this map contains no key/value pairs - O(1)
updates or removes a value - O(log n)
updates or removes a value - O(log n)
if f returns None, then the key is removed from the map
insert v into the map at k.
insert v into the map at k. If there is already a value for k, append to the existing value using the Semigroup
looks up a key and updates its value - O(log n)
looks up a key and updates its value - O(log n)
Similar to updateWithKey but also returns the value. If the value was updated, returns the new value. If the value was deleted, returns the old value.
like update but with the key available in the update function - O(log n)
An immutable map of key/value pairs implemented as a balanced binary tree
Based on Haskell's Data.Map
7.0.3