data IntMap a { } #
Nil
Tip
type Key = Int { } #
type Prefix = Int { } #
type Mask = Int { } #
empty :: IntMap a { } #
The empty map.
singleton :: Key -> a -> IntMap a { } #
A map with a single element.
fromList :: [(Key, a)] -> IntMap a { } #
Build a map from a list of key/value pairs.
fromListWith :: (a -> a -> a) -> [(Key, a)] -> IntMap a { } #
Build a map from a list with a combining function.
fromListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> IntMap a { } #
Build a map from a list with a combining function.
fromAscList :: [(Key, a)] -> IntMap a { } #
Build a map from an ascending list.
fromDistinctAscList :: [(Key, a)] -> IntMap a { } #
Build a map from an ascending list of distinct keys.
insert :: Key -> a -> (IntMap a) -> IntMap a { } #
Insert a new key/value pair.
insertWith :: (a -> a -> a) -> Key -> a -> (IntMap a) -> IntMap a { } #
Insert with a combining function.
insertWithKey :: (Key -> a -> a -> a) -> Key -> a -> (IntMap a) -> IntMap a { } #
Insert with a combining function that has access to the key.
insertLookupWithKey :: (Key -> a -> a -> a) -> Key -> a -> (IntMap a) -> (Maybe a, IntMap a) { } #
Insert with a combining function, also returning the old value if present.
delete :: Key -> (IntMap a) -> IntMap a { } #
Delete a key from the map.
adjust :: (a -> a) -> Key -> (IntMap a) -> IntMap a { } #
Adjust a value at a specific key.
adjustWithKey :: (Key -> a -> a) -> Key -> (IntMap a) -> IntMap a { } #
Adjust a value with access to the key.
update :: (a -> Maybe a) -> Key -> (IntMap a) -> IntMap a { } #
Update a value at a specific key.
updateWithKey :: (Key -> a -> Maybe a) -> Key -> (IntMap a) -> IntMap a { } #
Update with access to the key.
updateLookupWithKey :: (Key -> a -> Maybe a) -> Key -> (IntMap a) -> (Maybe a, IntMap a) { } #
Update with access to the key, also returning the old value.
alter :: ((Maybe a) -> Maybe a) -> Key -> (IntMap a) -> IntMap a { } #
Alter a value at a key.
alterF :: (Functor f) => ((Maybe a) -> f (Maybe a)) -> Key -> (IntMap a) -> f (IntMap a) { } #
Alter with a functor.
lookup :: Key -> (IntMap a) -> Maybe a { } #
Lookup a value at a key.
!? :: (IntMap a) -> Key -> Maybe a { } #
Lookup operator.
m :: { } #
findWithDefault :: a -> Key -> (IntMap a) -> a { } #
Lookup with a default value.
member :: Key -> (IntMap a) -> Bool { } #
Is the key a member of the map?
notMember :: Key -> (IntMap a) -> Bool { } #
Is the key not a member of the map?
null :: (IntMap a) -> Bool { } #
Is the map empty?
size :: (IntMap a) -> Int { } #
Number of elements in the map.
union :: (IntMap a) -> (IntMap a) -> IntMap a { } #
Left-biased union.
unionWith :: (a -> a -> a) -> (IntMap a) -> (IntMap a) -> IntMap a { } #
Union with a combining function.
unionWithKey :: (Key -> a -> a -> a) -> (IntMap a) -> (IntMap a) -> IntMap a { } #
Union with a combining function.
unions :: [IntMap a] -> IntMap a { } #
Union of a list of maps.
unionsWith :: (a -> a -> a) -> [IntMap a] -> IntMap a { } #
Union of a list with a combining function.
difference :: (IntMap a) -> (IntMap b) -> IntMap a { } #
Difference of two maps.
differenceWith :: (a -> b -> Maybe a) -> (IntMap a) -> (IntMap b) -> IntMap a { } #
Difference with a combining function.
differenceWithKey :: (Key -> a -> b -> Maybe a) -> (IntMap a) -> (IntMap b) -> IntMap a { } #
Difference with a combining function.
intersection :: (IntMap a) -> (IntMap b) -> IntMap a { } #
Intersection of two maps.
intersectionWith :: (a -> b -> c) -> (IntMap a) -> (IntMap b) -> IntMap c { } #
Intersection with a combining function.
intersectionWithKey :: (Key -> a -> b -> c) -> (IntMap a) -> (IntMap b) -> IntMap c { } #
Intersection with a combining function.
map :: (a -> b) -> (IntMap a) -> IntMap b { } #
Map a function over values.
mapWithKey :: (Key -> a -> b) -> (IntMap a) -> IntMap b { } #
Map with access to the key.
traverseWithKey :: (Applicative f) => (Key -> a -> f b) -> (IntMap a) -> f (IntMap b) { } #
Traverse with access to keys.
mapAccum :: (a -> b -> (a, c)) -> a -> (IntMap b) -> (a, IntMap c) { } #
Map with an accumulator.
mapAccumWithKey :: (a -> Key -> b -> (a, c)) -> a -> (IntMap b) -> (a, IntMap c) { } #
Map with an accumulator and key access.
mapAccumRWithKey :: (a -> Key -> b -> (a, c)) -> a -> (IntMap b) -> (a, IntMap c) { } #
foldr :: (a -> b -> b) -> b -> (IntMap a) -> b { } #
foldl :: (b -> a -> b) -> b -> (IntMap a) -> b { } #
Lazy left fold.
foldrWithKey :: (Key -> a -> b -> b) -> b -> (IntMap a) -> b { } #
Lazy right fold with key.
foldlWithKey :: (b -> Key -> a -> b) -> b -> (IntMap a) -> b { } #
Lazy left fold with key.
foldMapWithKey :: (Monoid m) => (Key -> a -> m) -> (IntMap a) -> m { } #
Fold to a monoid with key.
foldr' :: (a -> b -> b) -> b -> (IntMap a) -> b { } #
Strict right fold.
foldl' :: (b -> a -> b) -> b -> (IntMap a) -> b { } #
Strict left fold.
foldrWithKey' :: (Key -> a -> b -> b) -> b -> (IntMap a) -> b { } #
Strict right fold with key.
foldlWithKey' :: (b -> Key -> a -> b) -> b -> (IntMap a) -> b { } #
Strict left fold with key.
elems :: (IntMap a) -> [a] { } #
All values in ascending key order.
keys :: (IntMap a) -> [Key] { } #
All keys in ascending order.
assocs :: (IntMap a) -> [(Key, a)] { } #
All key/value pairs in ascending key order.
keysSet :: (IntMap a) -> IntSet.IntSet { } #
Convert keys to an IntSet.
toList :: (IntMap a) -> [(Key, a)] { } #
Convert to a list.
toAscList :: (IntMap a) -> [(Key, a)] { } #
Convert to an ascending list.
toDescList :: (IntMap a) -> [(Key, a)] { } #
Convert to a descending list.
filter :: (a -> Bool) -> (IntMap a) -> IntMap a { } #
Filter values satisfying a predicate.
filterWithKey :: (Key -> a -> Bool) -> (IntMap a) -> IntMap a { } #
Filter with key access.
restrictKeys :: (IntMap a) -> IntSet.IntSet -> IntMap a { } #
Restrict to keys in a set.
withoutKeys :: (IntMap a) -> IntSet.IntSet -> IntMap a { } #
Remove keys in a set.
partition :: (a -> Bool) -> (IntMap a) -> (IntMap a, IntMap a) { } #
Partition by a predicate.
partitionWithKey :: (Key -> a -> Bool) -> (IntMap a) -> (IntMap a, IntMap a) { } #
Partition with key access.
mapMaybe :: (a -> Maybe b) -> (IntMap a) -> IntMap b { } #
Map and collect Just results.
mapMaybeWithKey :: (Key -> a -> Maybe b) -> (IntMap a) -> IntMap b { } #
Map and collect Just results with key access.
mapEither :: (a -> Either b c) -> (IntMap a) -> (IntMap b, IntMap c) { } #
Map and partition by Left/Right.
mapEitherWithKey :: (Key -> a -> Either b c) -> (IntMap a) -> (IntMap b, IntMap c) { } #
Map and partition with key access.
isSubmapOf :: (Eq a) => (IntMap a) -> (IntMap a) -> Bool { } #
Is the first map a submap of the second?
isSubmapOfBy :: (a -> b -> Bool) -> (IntMap a) -> (IntMap b) -> Bool { } #
Submap with custom equality.
isProperSubmapOf :: (Eq a) => (IntMap a) -> (IntMap a) -> Bool { } #
Is the first map a proper submap of the second?
isProperSubmapOfBy :: (a -> b -> Bool) -> (IntMap a) -> (IntMap b) -> Bool { } #
Proper submap with custom equality.
lookupMin :: (IntMap a) -> Maybe (Key, a) { } #
Lookup minimum key and value.
lookupMax :: (IntMap a) -> Maybe (Key, a) { } #
Lookup maximum key and value.
findMin :: (IntMap a) -> (Key, a) { } #
Find minimum (partial).
findMax :: (IntMap a) -> (Key, a) { } #
Find maximum (partial).
deleteMin :: (IntMap a) -> IntMap a { } #
Delete minimum.
deleteMax :: (IntMap a) -> IntMap a { } #
Delete maximum.
deleteFindMin :: (IntMap a) -> ((Key, a), IntMap a) { } #
Delete and return minimum.
deleteFindMax :: (IntMap a) -> ((Key, a), IntMap a) { } #
Delete and return maximum.
updateMin :: (a -> Maybe a) -> (IntMap a) -> IntMap a { } #
Update minimum value.
updateMax :: (a -> Maybe a) -> (IntMap a) -> IntMap a { } #
Update maximum value.
updateMinWithKey :: (Key -> a -> Maybe a) -> (IntMap a) -> IntMap a { } #
Update minimum with key.
updateMaxWithKey :: (Key -> a -> Maybe a) -> (IntMap a) -> IntMap a { } #
Update maximum with key.
minView :: (IntMap a) -> Maybe (a, IntMap a) { } #
View with minimum removed.
maxView :: (IntMap a) -> Maybe (a, IntMap a) { } #
View with maximum removed.
minViewWithKey :: (IntMap a) -> Maybe ((Key, a), IntMap a) { } #
View with minimum key/value removed.
maxViewWithKey :: (IntMap a) -> Maybe ((Key, a), IntMap a) { } #
View with maximum key/value removed.
split :: Key -> (IntMap a) -> (IntMap a, IntMap a) { } #
Split at a key.
splitLookup :: Key -> (IntMap a) -> (IntMap a, Maybe a, IntMap a) { } #
Split at a key, also returning the value if present.
splitRoot :: (IntMap a) -> [IntMap a] { } #
Decompose into pieces based on structure.
bin :: Prefix -> Mask -> (IntMap a) -> (IntMap a) -> IntMap a { } #
Smart constructor.
zero :: Key -> Mask -> Bool { } #
Check if bit is zero.
nomatch :: Key -> Prefix -> Mask -> Bool { } #
Check for match with prefix.
match :: Key -> Prefix -> Mask -> Bool { } #
Check for match.
mask :: Key -> Mask -> Prefix { } #
Get prefix.
shorter :: Mask -> Mask -> Bool { } #
branchMask :: Prefix -> Prefix -> Mask { } #
Find branching bit.
highestBitMask :: Int -> Int { } #
Get highest set bit as mask.
instance Show a => Show (IntMap a) { }
instance Functor IntMap { }
instance Foldable IntMap { }
instance Traversable IntMap { }
instance Semigroup (IntMap a) { }
instance Monoid (IntMap a) { }