fsprojects/FSharpx.Collections


IntMap

Namespace: FSharpx.Collections.Experimental

Functions and values

Function or valueDescription
adjust f k m
Signature: f:('?13067 -> '?13067) -> k:int -> m:IntMap<'?13067> -> IntMap<'?13067>
Type parameters: '?13067

O(min(n,W)). Adjust a value at a specific key. When the key is not a member of the map, the original map is returned. Credit: Haskell.org

adjustWithKey f k m
Signature: f:(int -> '?13065 -> '?13065) -> k:int -> m:IntMap<'?13065> -> IntMap<'?13065>
Type parameters: '?13065

O(min(n,W)). Adjust a value at a specific key. When the key is not a member of the map, the original map is returned. Credit: Haskell.org

alter f k t
Signature: f:('?13071 option -> '?13071 option) -> k:int -> t:IntMap<'?13071> -> IntMap<'?13071>
Type parameters: '?13071

O(log n). The expression (alter f k map) alters the value x at k, or absence thereof. alter can be used to insert, delete, or update a value in an IntMap. Credit: Haskell.org

append m1 m2
Signature: m1:IntMap<'?13084> -> m2:IntMap<'?13084> -> IntMap<'?13084>
Type parameters: '?13084
appendWith f m1 m2
Signature: f:('?13088 -> '?13088 -> '?13088) -> m1:IntMap<'?13088> -> m2:IntMap<'?13088> -> IntMap<'?13088>
Type parameters: '?13088
appendWithKey f m1 m2
Signature: f:(int -> '?13086 -> '?13086 -> '?13086) -> m1:IntMap<'?13086> -> m2:IntMap<'?13086> -> IntMap<'?13086>
Type parameters: '?13086
concat xs
Signature: xs:IntMap<'?13090> list -> IntMap<'?13090>
Type parameters: '?13090
concatWith f xs
Signature: f:('?13092 -> '?13092 -> '?13092) -> xs:IntMap<'?13092> list -> IntMap<'?13092>
Type parameters: '?13092
delete k t
Signature: k:int -> t:IntMap<'?13059> -> IntMap<'?13059>
Type parameters: '?13059

O(min(n,W)). Delete a key and its value from the map. When the key is not a member of the map, the original map is returned. Credit: Haskell.org

deleteFindMax t
Signature: t:IntMap<'?13134> -> (int * '?13134) * IntMap<'?13134>
Type parameters: '?13134

O(log n). Retrieves the maximal key of the map, and the map stripped from that element. Credit: Haskell.org

deleteFindMin t
Signature: t:IntMap<'?13136> -> (int * '?13136) * IntMap<'?13136>
Type parameters: '?13136

O(log n). Retrieves the minimal key of the map, and the map stripped from that element. Credit: Haskell.org

deleteMax t
Signature: t:IntMap<'?13144> -> IntMap<'?13144>
Type parameters: '?13144

O(log n). Delete the maximal key. Credit: Haskell.org

deleteMin t
Signature: t:IntMap<'?13142> -> IntMap<'?13142>
Type parameters: '?13142

O(log n). Delete the minimal key. Credit: Haskell.org

difference m1 m2
Signature: m1:IntMap<'?13094> -> m2:IntMap<'?13095> -> IntMap<'?13094>
Type parameters: '?13094, '?13095

O(n+m). Difference between two maps (based on keys). Credit: Haskell.org

differenceWith f m1 m2
Signature: f:('?13100 -> '?13101 -> '?13100 option) -> m1:IntMap<'?13100> -> m2:IntMap<'?13101> -> IntMap<'?13100>
Type parameters: '?13100, '?13101

O(n+m). Difference with a combining function. Credit: Haskell.org

differenceWithKey f m1 m2
Signature: f:(int -> '?13097 -> '?13098 -> '?13097 option) -> m1:IntMap<'?13097> -> m2:IntMap<'?13098> -> IntMap<'?13097>
Type parameters: '?13097, '?13098

O(n+m). Difference with a combining function. When two equal keys are encountered, the combining function is applied to the key and both values. If it returns Nothing, the element is discarded (proper set difference). If it returns (Just y), the element is updated with a new value y. Credit: Haskell.org

empty
Signature: IntMap<'b>
Type parameters: 'b

O(1). The empty map. Credit: Haskell.org

exists k _arg1
Signature: k:int -> _arg1:IntMap<'?13027> -> bool
Type parameters: '?13027

O(min(n,W)). Is the key a member of the map? Credit: Haskell.org

filter p m
Signature: p:('?13166 -> bool) -> m:IntMap<'?13166> -> IntMap<'?13166>
Type parameters: '?13166

O(n). Filter all values that satisfy some predicate. Credit: Haskell.org

filterWithKey predicate _arg1
Signature: predicate:(int -> '?13164 -> bool) -> _arg1:IntMap<'?13164> -> IntMap<'?13164>
Type parameters: '?13164

O(n). Filter all keys/values that satisfy some predicate. Credit: Haskell.org

find k m
Signature: k:int -> m:IntMap<'?13031> -> '?13031
Type parameters: '?13031

O(min(n,W)). Lookup the value at a key in the map. Credit: Haskell.org

findMax t
Signature: t:IntMap<'?13140> -> int * '?13140
Type parameters: '?13140

O(log n). The maximal key of the map. Credit: Haskell.org

findMin t
Signature: t:IntMap<'?13138> -> int * '?13138
Type parameters: '?13138

O(log n). The minimal key of the map. Credit: Haskell.org

findWithDefault def k _arg1
Signature: def:'?13033 -> k:int -> _arg1:IntMap<'?13033> -> '?13033
Type parameters: '?13033

O(min(n,W)). The expression (findWithDefault def k map) returns the value at key k or returns def when the key is not an element of the map. Credit: Haskell.org

fold f z
Signature: f:('?13193 -> '?13194 -> '?13193) -> z:'?13193 -> IntMap<'?13194> -> '?13193
Type parameters: '?13193, '?13194

O(n). Fold the values in the map, such that fold f z == Prelude.foldr f z . elems. Credit: Haskell.org

foldBack f z
Signature: f:('?13190 -> '?13191 -> '?13191) -> z:'?13191 -> IntMap<'?13190> -> '?13191
Type parameters: '?13190, '?13191

O(n). FoldBack the values in the map, such that fold f z == Prelude.foldr f z . elems. Credit: Haskell.org

foldBackWithKey f z t
Signature: f:(int -> '?13196 -> '?13197 -> '?13197) -> z:'?13197 -> t:IntMap<'?13196> -> '?13197
Type parameters: '?13196, '?13197

O(n). FoldBack the keys and values in the map, such that foldWithKey f z == Prelude.foldr (uncurry f) z . toAscList. Credit: Haskell.org

foldWithKey f z
Signature: f:('?13199 -> int -> '?13200 -> '?13199) -> z:'?13199 -> IntMap<'?13200> -> '?13199
Type parameters: '?13199, '?13200

O(n). Fold the keys and values in the map, such that foldWithKey f z == Prelude.foldr (uncurry f) z . toAscList. Credit: Haskell.org

insert k x t
Signature: k:int -> x:'?13051 -> t:IntMap<'?13051> -> IntMap<'?13051>
Type parameters: '?13051

O(min(n,W)). Insert a new key/value pair in the map. If the key is already present in the map, the associated value is replaced with the supplied value, i.e. insert is equivalent to insertWith const. Credit: Haskell.org

insertTryFindWithKey f k x t
Signature: f:(int -> '?13057 -> '?13057 -> '?13057) -> k:int -> x:'?13057 -> t:IntMap<'?13057> -> '?13057 option * IntMap<'?13057>
Type parameters: '?13057

O(min(n,W)). The expression (insertLookupWithKey f k x map) is a pair where the first element is equal to (lookup k map) and the second element equal to (insertWithKey f k x map). Credit: Haskell.org

insertWith f k x t
Signature: f:('b -> 'b -> 'b) -> k:int -> x:'b -> t:IntMap<'b> -> IntMap<'b>
Type parameters: 'b

O(min(n,W)). Insert with a combining function. insertWith f key value mp will insert the pair (key, value) into mp if key does not exist in the map. If the key does exist, the function will insert f newvalue oldvalue. Credit: Haskell.org

insertWithKey f k x t
Signature: f:(int -> '?13053 -> '?13053 -> '?13053) -> k:int -> x:'?13053 -> t:IntMap<'?13053> -> IntMap<'?13053>
Type parameters: '?13053

O(min(n,W)). Insert with a combining function. insertWithKey f key value mp will insert the pair (key, value) into mp if key does not exist in the map. If the key does exist, the function will insert f key newvalue oldvalue. Credit: Haskell.org

intersection m1 m2
Signature: m1:IntMap<'?13103> -> m2:IntMap<'?13104> -> IntMap<'?13103>
Type parameters: '?13103, '?13104

O(n+m). The (left-biased) intersection of two maps (based on keys). Credit: Haskell.org

intersectionWith f m1 m2
Signature: f:('?13110 -> '?13111 -> '?13112) -> m1:IntMap<'?13110> -> m2:IntMap<'?13111> -> IntMap<'?13112>
Type parameters: '?13110, '?13111, '?13112

O(n+m). The intersection with a combining function. Credit: Haskell.org

intersectionWithKey f m1 m2
Signature: f:(int -> '?13106 -> '?13107 -> '?13108) -> m1:IntMap<'?13106> -> m2:IntMap<'?13107> -> IntMap<'?13108>
Type parameters: '?13106, '?13107, '?13108

O(n+m). The intersection with a combining function. Credit: Haskell.org

isEmpty _arg1
Signature: _arg1:IntMap<'?13021> -> bool
Type parameters: '?13021

O(1). Map is empty. Credit: Haskell.org

isProperSubmapOf m1 m2
Signature: m1:IntMap<'?13255> -> m2:IntMap<'?13255> -> bool
Type parameters: '?13255

O(n+m). Is this a proper submap? (ie. a submap but not equal). Defined as (isProperSubmapOf = isProperSubmapOfBy (==)). Credit: Haskell.org

isProperSubmapOfBy predicate t1 t2
Signature: predicate:('?13252 -> '?13253 -> bool) -> t1:IntMap<'?13252> -> t2:IntMap<'?13253> -> bool
Type parameters: '?13252, '?13253

O(n+m). Is this a proper submap? (ie. a submap but not equal). The expression (isProperSubmapOfBy f m1 m2) returns True when m1 and m2 are not equal, all keys in m1 are in m2, and when f returns True when applied to their respective values. Credit: Haskell.org

isSubmapOf m1 m2
Signature: m1:IntMap<'?13237> -> m2:IntMap<'?13237> -> bool
Type parameters: '?13237

O(n+m). Is this a submap? Defined as (isSubmapOf = isSubmapOfBy (==)). Credit: Haskell.org

isSubmapOfBy predicate t1 t2
Signature: predicate:('?13234 -> '?13235 -> bool) -> t1:IntMap<'?13234> -> t2:IntMap<'?13235> -> bool
Type parameters: '?13234, '?13235

O(n+m). The expression (isSubmapOfBy f m1 m2) returns True if all keys in m1 are in m2, and when f returns True when applied to their respective values. Credit: Haskell.org

keys m
Signature: m:IntMap<'?13204> -> int list
Type parameters: '?13204

O(n). Return all keys of the map in ascending order. Credit: Haskell.org

konst a arg2
Signature: a:'?13081 -> '?13082 -> '?13081
Type parameters: '?13081, '?13082
map f _arg1
Signature: f:('?13149 -> '?13150) -> _arg1:IntMap<'?13149> -> IntMap<'?13150>
Type parameters: '?13149, '?13150

O(n). Map a function over all values in the map. Credit: Haskell.org

mapAccum f
Signature: f:('?13160 -> '?13161 -> '?13160 * '?13162) -> '?13160 -> IntMap<'?13161> -> '?13160 * IntMap<'?13162>
Type parameters: '?13160, '?13161, '?13162

O(n). The function mapAccumWithKey threads an accumulating argument through the map in ascending order of keys. Credit: Haskell.org

mapAccumWithKey f a t
Signature: f:('?13156 -> int -> '?13157 -> '?13156 * '?13158) -> a:'?13156 -> t:IntMap<'?13157> -> '?13156 * IntMap<'?13158>
Type parameters: '?13156, '?13157, '?13158

O(n). The function mapAccum threads an accumulating argument through the map in ascending order of keys. Credit: Haskell.org

mapChoice f
Signature: f:('?13182 -> Choice<'?13183,'?13184>) -> IntMap<'?13182> -> IntMap<'?13183> * IntMap<'?13184>
Type parameters: '?13182, '?13183, '?13184

O(n). Map values and separate the Left and Right results. Credit: Haskell.org

mapChoiceWithKey f _arg1
Signature: f:(int -> '?13178 -> Choice<'?13179,'?13180>) -> _arg1:IntMap<'?13178> -> IntMap<'?13179> * IntMap<'?13180>
Type parameters: '?13178, '?13179, '?13180

O(n). Map keys/values and separate the Left and Right results. Credit: Haskell.org

mapKeys f
Signature: f:(int -> int) -> IntMap<'?13230> -> IntMap<'?13230>
Type parameters: '?13230

O(n*min(n,W)). mapKeys f s is the map obtained by applying f to each key of s. The size of the result may be smaller if f maps two or more distinct keys to the same new key. In this case the value at the greatest of the original keys is retained. Credit: Haskell.org

mapKeysWith c f
Signature: c:('?13232 -> '?13232 -> '?13232) -> f:(int -> int) -> IntMap<'?13232> -> IntMap<'?13232>
Type parameters: '?13232

O(n*log n). mapKeysWith c f s is the map obtained by applying f to each key of s. The size of the result may be smaller if f maps two or more distinct keys to the same new key. In this case the associated values will be combined using c. Credit: Haskell.org

mapOption f
Signature: f:('?13175 -> '?13176 option) -> IntMap<'?13175> -> IntMap<'?13176>
Type parameters: '?13175, '?13176

O(n). Map values and collect the Just results. Credit: Haskell.org

mapOptionWithKey f _arg1
Signature: f:(int -> '?13172 -> '?13173 option) -> _arg1:IntMap<'?13172> -> IntMap<'?13173>
Type parameters: '?13172, '?13173

O(n). Map keys/values and collect the Just results. Credit: Haskell.org

mapWithKey f _arg1
Signature: f:(int -> '?13146 -> '?13147) -> _arg1:IntMap<'?13146> -> IntMap<'?13147>
Type parameters: '?13146, '?13147

O(n). Map a function over all values in the map. Credit: Haskell.org

maxView t
Signature: t:IntMap<'?13130> -> ('?13130 * IntMap<'?13130>) option
Type parameters: '?13130

O(min(n,W)). Retrieves the maximal key of the map, and the map stripped of that element, or Nothing if passed an empty map. Credit: Haskell.org

maxViewWithKey t
Signature: t:IntMap<'?13118> -> ((int * '?13118) * IntMap<'?13118>) option
Type parameters: '?13118

O(log n). Retrieves the maximal (key,value) couple of the map, and the map stripped from that element. fails (in the monad) when passed an empty map. Credit: Haskell.org

mergeWithKey f g1 g2
Signature: f:(int -> '?13077 -> '?13078 -> '?13079 option) -> g1:(IntMap<'?13077> -> IntMap<'?13079>) -> g2:(IntMap<'?13078> -> IntMap<'?13079>) -> IntMap<'?13077> -> IntMap<'?13078> -> IntMap<'?13079>
Type parameters: '?13077, '?13078, '?13079

Refer to Haskell documentation. Unexpected code growth or corruption of the data structure can occure from wrong use. Credit: Haskell.org

minView t
Signature: t:IntMap<'?13132> -> ('?13132 * IntMap<'?13132>) option
Type parameters: '?13132

O(min(n,W)). Retrieves the minimal key of the map, and the map stripped of that element, or Nothing if passed an empty map. Credit: Haskell.org

minViewWithKey t
Signature: t:IntMap<'?13120> -> ((int * '?13120) * IntMap<'?13120>) option
Type parameters: '?13120

O(log n). Retrieves the minimal (key,value) couple of the map, and the map stripped from that element. fails (in the monad) when passed an empty map. Credit: Haskell.org

notExists k m
Signature: k:int -> m:IntMap<'?13029> -> bool
Type parameters: '?13029

O(log n). Is the key not a member of the map? Credit: Haskell.org

ofArray xs
Signature: xs:(int * '?13224) [] -> IntMap<'?13224>
Type parameters: '?13224

O(n*min(n,W)). Create a map from an array of key/value pairs. Credit: Haskell.org

ofArrayWith f xs
Signature: f:('?13228 -> '?13228 -> '?13228) -> xs:(int * '?13228) [] -> IntMap<'?13228>
Type parameters: '?13228

O(n*min(n,W)). Create a map from an array of key/value pairs with a combining function. See also fromAscListWith. Credit: Haskell.org

ofArrayWithKey f xs
Signature: f:(int -> '?13226 -> '?13226 -> '?13226) -> xs:(int * '?13226) [] -> IntMap<'?13226>
Type parameters: '?13226

O(n*min(n,W)). Build a map from an array of key/value pairs with a combining function. See also fromAscListWithKey'. Credit: Haskell.org

ofList xs
Signature: xs:(int * '?13212) list -> IntMap<'?13212>
Type parameters: '?13212

O(n*min(n,W)). Create a map from a list of key/value pairs. Credit: Haskell.org

ofListWith f xs
Signature: f:('?13216 -> '?13216 -> '?13216) -> xs:(int * '?13216) list -> IntMap<'?13216>
Type parameters: '?13216

O(n*min(n,W)). Create a map from a list of key/value pairs with a combining function. See also fromAscListWith. Credit: Haskell.org

ofListWithKey f xs
Signature: f:(int -> '?13214 -> '?13214 -> '?13214) -> xs:(int * '?13214) list -> IntMap<'?13214>
Type parameters: '?13214

O(n*min(n,W)). Build a map from a list of key/value pairs with a combining function. See also fromAscListWithKey'. Credit: Haskell.org

ofSeq xs
Signature: xs:seq<int * '?13218> -> IntMap<'?13218>
Type parameters: '?13218

O(n*min(n,W)). Create a map from a seq of key/value pairs. Credit: Haskell.org

ofSeqWith f xs
Signature: f:('?13222 -> '?13222 -> '?13222) -> xs:seq<int * '?13222> -> IntMap<'?13222>
Type parameters: '?13222

O(n*min(n,W)). Create a map from a seq of key/value pairs with a combining function. See also fromAscListWith. Credit: Haskell.org

ofSeqWithKey f xs
Signature: f:(int -> '?13220 -> '?13220 -> '?13220) -> xs:seq<int * '?13220> -> IntMap<'?13220>
Type parameters: '?13220

O(n*min(n,W)). Build a map from a seq of key/value pairs with a combining function. See also fromAscListWithKey'. Credit: Haskell.org

partition p m
Signature: p:('?13170 -> bool) -> m:IntMap<'?13170> -> IntMap<'?13170> * IntMap<'?13170>
Type parameters: '?13170

O(n). partition the map according to some predicate. The first map contains all elements that satisfy the predicate, the second all elements that fail the predicate. See also split. Credit: Haskell.org

partitionWithKey predicate t
Signature: predicate:(int -> '?13168 -> bool) -> t:IntMap<'?13168> -> IntMap<'?13168> * IntMap<'?13168>
Type parameters: '?13168

O(n). partition the map according to some predicate. The first map contains all elements that satisfy the predicate, the second all elements that fail the predicate. See also split. Credit: Haskell.org

singleton k x
Signature: k:int -> x:'?13049 -> IntMap<'?13049>
Type parameters: '?13049

O(1). A map of one element. Credit: Haskell.org

size _arg1
Signature: _arg1:IntMap<'?13023> -> int
Type parameters: '?13023

O(n). Number of elements in the map. Credit: Haskell.org

split k t
Signature: k:int -> t:IntMap<'b> -> IntMap<'b> * IntMap<'b>
Type parameters: 'b

O(log n). The expression (split k map) is a pair (map1,map2) where all keys in map1 are lower than k and all keys in map2 larger than k. Any key equal to k is found in neither map1 nor map2. Credit: Haskell.org

splitTryFind k t
Signature: k:int -> t:IntMap<'?13188> -> IntMap<'?13188> * '?13188 option * IntMap<'?13188>
Type parameters: '?13188

O(log n). Performs a split but also returns whether the pivot key was found in the original map. Credit: Haskell.org

toArray m
Signature: m:IntMap<'?13210> -> (int * '?13210) []
Type parameters: '?13210

O(n). Convert the map to an array of key/value pairs. Credit: Haskell.org

toList m
Signature: m:IntMap<'?13206> -> (int * '?13206) list
Type parameters: '?13206

O(n). Convert the map to a list of key/value pairs. Credit: Haskell.org

toSeq m
Signature: m:IntMap<'?13208> -> seq<int * '?13208>
Type parameters: '?13208

O(n). Convert the map to a seq of key/value pairs. Credit: Haskell.org

tryFind k _arg1
Signature: k:int -> _arg1:IntMap<'c> -> 'c option
Type parameters: 'c

O(min(n,W)). Lookup the value at a key in the map. Returns 'T option. Credit: Haskell.org

tryFindGE k t
Signature: k:int -> t:IntMap<'?13045> -> (int * '?13045) option
Type parameters: '?13045

O(log n). Find smallest key greater or equal to the given one and return the corresponding (key, value) pair Credit: Haskell.org

tryFindGT k t
Signature: k:int -> t:IntMap<'?13041> -> (int * '?13041) option
Type parameters: '?13041

O(log n). Find smallest key greater than the given one and return the corresponding (key, value) pair. Credit: Haskell.org

tryFindLE k t
Signature: k:int -> t:IntMap<'?13043> -> (int * '?13043) option
Type parameters: '?13043

O(log n). Find largest key smaller or equal to the given one and return the corresponding (key, value) pair. Credit: Haskell.org

tryFindLT k t
Signature: k:int -> t:IntMap<'?13037> -> (int * '?13037) option
Type parameters: '?13037

O(log n). Find largest key smaller than the given one and return the corresponding (key, value) pair. Credit: Haskell.org

update f k m
Signature: f:('b -> 'b option) -> k:int -> m:IntMap<'b> -> IntMap<'b>
Type parameters: 'b

O(min(n,W)). The expression (update f k map) updates the value x at k (if it is in the map). If (f x) is Nothing, the element is deleted. If it is (Just y), the key k is bound to the new value y. Credit: Haskell.org

updateMax f
Signature: f:('?13122 -> '?13122 option) -> IntMap<'?13122> -> IntMap<'?13122>
Type parameters: '?13122

O(log n). Update the value at the maximal key. Credit: Haskell.org

updateMaxWithKey f t
Signature: f:(int -> '?13116 -> '?13116 option) -> t:IntMap<'?13116> -> IntMap<'?13116>
Type parameters: '?13116

O(log n). Update the value at the maximal key. Credit: Haskell.org

updateMin f
Signature: f:('?13124 -> '?13124 option) -> IntMap<'?13124> -> IntMap<'?13124>
Type parameters: '?13124

O(log n). Update the value at the minimal key. Credit: Haskell.org

updateMinWithKey f t
Signature: f:(int -> '?13114 -> '?13114 option) -> t:IntMap<'?13114> -> IntMap<'?13114>
Type parameters: '?13114

O(log n). Update the value at the minimal key. Credit: Haskell.org

updateTryFindWithKey f k t
Signature: f:(int -> '?13069 -> '?13069 option) -> k:int -> t:IntMap<'?13069> -> '?13069 option * IntMap<'?13069>
Type parameters: '?13069

O(min(n,W)). Lookup and update. Credit: Haskell.org

updateWithKey f k t
Signature: f:(int -> '?13061 -> '?13061 option) -> k:int -> t:IntMap<'?13061> -> IntMap<'?13061>
Type parameters: '?13061

O(min(n,W)). The expression (update f k map) updates the value x at k (if it is in the map). If (f k x) is Nothing, the element is deleted. If it is (Just y), the key k is bound to the new value y. Credit: Haskell.org

values m
Signature: m:IntMap<'a> -> 'a list
Type parameters: 'a

O(n). Return all elements of the map in the ascending order of their keys. Credit: Haskell.org

Fork me on GitHub