Map
Types
Tip
Bin
Functions
O(1). The empty map.
O(1). A map with a single element.
O(n * log n). Build a map from a list of key-value pairs.
O(n * log n). Build a map from a list with a combining function.
O(n * log n). Build a map from a list with a key-aware combining function.
O(log n). Lookup a value at a key in the map.
O(log n). Is the key a member of the map?
O(log n). Is the key not a member of the map?
O(1). Is the map empty?
O(1). The number of elements in the map.
O(log n). Insert a new key-value pair. If the key already exists,
O(log n). Insert with a combining function.
O(log n). Insert with a key-aware combining function.
O(log n). Combine insert with lookup of the old value.
O(log n). Adjust a value at a specific key with a function.
O(log n). Adjust a value with access to the key.
O(log n). Update a value at a key. If the function returns Nothing,
O(log n). Update a value with access to the key.
O(log n). The most general update function. Can insert, update, or delete.
O(log n). Functor-based alter. Useful for working with effects.
O(m * log(n\m + 1)), m <= n/. Left-biased union of two maps.
O(m * log(n\m + 1)), m <= n/. Union with a combining function.
O(m * log(n\m + 1)), m <= n/. Union with a key-aware combining function.
O(m * log(n\m + 1)), m <= n/. Union of a foldable of maps.
O(m * log(n\m + 1)), m <= n/. Union of maps with a combining function.
O(m * log(n\m + 1)), m <= n/. Difference of two maps.
O(m * log(n\m + 1)), m <= n/. Difference with a combining function.
O(m * log(n\m + 1)), m <= n/. Difference with a key-aware combining function.
O(m * log(n\m + 1)), m <= n/. Intersection of two maps.
O(m * log(n\m + 1)), m <= n/. Intersection with a combining function.
O(m * log(n\m + 1)), m <= n/. Intersection with a key-aware combining function.
O(n). Map a function over all values in the map.
O(n). Map a function over all values with access to the key.
O(n). Traverse the map with effects, providing access to keys.
O(n). Thread an accumulating argument through the map in ascending order.
O(n). Thread an accumulating argument with access to keys.
O(n * log n). Map a function over the keys.
O(n * log n). Map over keys with a combining function for collisions.
O(n). Map over keys with a strictly monotonic function.
O(n). Fold the values in the map using a right-associative operator.
O(n). Fold the values using a left-associative operator.
O(n). Fold with access to keys, right-associative.
O(n). Fold with access to keys, left-associative.
O(n). Fold the map into a monoid with access to keys.
O(n). Return all values of the map in ascending key order.
O(n). Return all keys of the map in ascending order.
O(n). Return all key-value pairs in ascending key order.
O(n * log n). Convert the keys to a 'Set.Set'.
O(n). Convert to a list of key-value pairs in ascending key order.
O(n). Convert to an ascending list.
O(n). Convert to a descending list.
O(n). Filter all values that satisfy a predicate.
O(n). Filter with access to keys.
O(n). Partition the map according to a predicate.
O(n). Partition with access to keys.
O(n). Map and filter in a single pass.
O(n). Map and filter with access to keys.
O(n). Map and split into two maps based on Either.
O(n). Map and split with access to keys.
O(n * log n). Is the first map a submap of the second?
O(n * log n). Submap check with a custom equality predicate.
O(n * log n). Is the first map a proper submap of the second?
O(n * log n). Proper submap check with a custom equality predicate.
O(log n). Lookup the smallest key and its value.
O(log n). Lookup the largest key and its value.
O(log n). Find the smallest key and its value.
O(log n). Find the largest key and its value.
O(log n). Delete the smallest key. Returns the empty map if empty.
O(log n). Delete the largest key. Returns the empty map if empty.
O(log n). Split the map at a key. Returns maps with keys less than