fJA      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@portable experimentalross@soi.city.ac.ukVABCD%View of the right end of a sequence. *the sequence minus the rightmost element,  and the rightmost element empty sequence $View of the left end of a sequence. .leftmost element and the rest of the sequence empty sequence EFGHIJKLMNOPQRSTUV"General-purpose finite sequences. WXYZ[\]^_O(1). The empty sequence. O(1). A singleton sequence. O(1)0. Add an element to the left end of a sequence. A Mnemonic: a triangle with the single element at the pointy end. ` O(1)1. Add an element to the right end of a sequence. A Mnemonic: a triangle with the single element at the pointy end. a O(log(min(n1,n2))). Concatenate two sequences. bcdefghijk O(1). Is this the empty sequence? O(1)*. The number of elements in the sequence. lO(1)&. Analyse the left end of a sequence. mnO(1)'. Analyse the right end of a sequence. oO(log(min(i,n-i)))(. The element at the specified position pqrO(log(min(i,n-i)))0. Replace the element at the specified position O(log(min(i,n-i)))/. Update the element at the specified position stuO(log(min(i,n-i))) . The first i elements of a sequence. O(log(min(i,n-i)))). Elements of a sequence after the first i. O(log(min(i,n-i)))(. Split a sequence at a given position. vwxyz{O(n)4. Create a sequence from a finite list of elements.  There is a function |# in the opposite direction for all  instances of the } class, including . O(n). The reverse of a sequence. ~    portable provisionallibraries@haskell.org@A set of values a. O(n+m). See *. O(1). Is this the empty set? O(1)%. The number of elements in the set. O(log n). Is the element in the set? O(log n)!. Is the element not in the set? O(1). The empty set. O(1). Create a singleton set. O(log n). Insert an element in a set. B If the set already contains an element equal to the given value, $ it is replaced with the new value. !O(log n) . Delete an element from a set. "O(n+m)9. Is this a proper subset? (ie. a subset but not equal). #O(n+m). Is this a subset?  (s1 # s2) tells whether s1 is a subset of s2. $O(log n) . The minimal element of a set. %O(log n) . The maximal element of a set. &O(log n). Delete the minimal element. 'O(log n). Delete the maximal element. (The union of a list of sets: (( ==  ) ). )O(n+m)7. The union of two sets, preferring the first set when ! equal elements are encountered. ' The implementation uses the efficient  hedge-union algorithm. * Hedge-union is more efficient on (bigset ) smallset). *O(n+m). Difference of two sets. & The implementation uses an efficient hedge algorithm comparable with  hedge-union. +O(n+m) . The intersection of two sets. @ Elements of the result come from the first set, so for example   import qualified Data.Set as S  data AB = A | B deriving Show ( instance Ord AB where compare _ _ = EQ $ instance Eq AB where _ == _ = True = main = print (S.singleton A `S.intersection` S.singleton B, = S.singleton B `S.intersection` S.singleton A) prints  (fromList [A] ,fromList [B]). ,O(n)2. Filter all elements that satisfy the predicate. -O(n)F. Partition the set into two sets, one with all elements that satisfy 1 the predicate and one with all elements that don't satisfy the predicate.  See also 7. . O(n*log n).  . f s! is the set obtained by applying f to each element of s. It'>s worth noting that the size of the result may be smaller if,  for some (x,y), x /= y && f x == f y /O(n). The / f s == . f s, but works only when f is monotonic.   The precondition is not checked.  Semi-formally, we have: / and [x < y ==> f x < f y | x <- ls, y <- ls] 5 ==> mapMonotonic f s == map f s  where ls = toList s 0O(n);. Fold over the elements of a set in an unspecified order. O(n). Post-order fold. 1O(n). The elements of a set. 2O(n)). Convert the set to a list of elements. 3O(n)4. Convert the set to an ascending list of elements. 4 O(n*log n)(. Create a set from a list of elements. 5O(n)5. Build a set from an ascending list in linear time.  :The precondition (input list is ascending) is not checked. 6O(n)J. Build a set from an ascending list of distinct elements in linear time.  CThe precondition (input list is strictly ascending) is not checked. 7O(log n). The expression (7 x set ) is a pair  (set1,set2)  where all elements in set1 are lower than x and all elements in  set2 larger than x. x is not found in neither set1 nor set2. 8O(log n) . Performs a 7$ but also returns whether the pivot ( element was found in the original set. O(log n) . Performs a 7 but also returns the pivot - element that was found in the original set. 9O(log n)'. Delete and find the minimal element. 2 deleteFindMin set = (findMin set, deleteMin set) :O(log n)'. Delete and find the maximal element. 2 deleteFindMax set = (findMax set, deleteMax set) ;O(log n)O. Retrieves the minimal key of the set, and the set stripped from that element  fail+s (in the monad) when passed an empty set. <O(log n)O. Retrieves the maximal key of the set, and the set stripped from that element  fail+s (in the monad) when passed an empty set. =O(n);. Show the tree that implements the set. The tree is shown " in a compressed, hanging format. >O(n). The expression (showTreeWith hang wide map) shows & the tree that implements the set. If hang is  True, a hanging5 tree is shown otherwise a rotated tree is shown. If  wide is ", an extra wide version is shown. F Set> putStrLn $ showTreeWith True False $ fromDistinctAscList [1..5]  4  +--2  | +--1  | +--3  +--5  E Set> putStrLn $ showTreeWith True True $ fromDistinctAscList [1..5]  4  |  +--2  | |  | +--1  | |  | +--3  |  +--5  F Set> putStrLn $ showTreeWith False True $ fromDistinctAscList [1..5]  +--5  |  4  |  | +--3  | |  +--2  |  +--1 ?O(n)/. Test if the internal set structure is valid. ( !"#$%&'()*+,-./0123456789:;<=>?(#" !)(*+,-78./0$%&'9:<;124356=>?( !"#$%&'()*+,-./0123456789:;<=>?portable provisionallibraries@haskell.org@A Map from keys k to values a. AO(log n). Find the value at a key.  Calls $ when the element can not be found. BO(n+m). See n. CO(1). Is the map empty? DO(1)%. The number of elements in the map. EO(log n)). Lookup the value at a key in the map. The function will  return the result in the monad or fail in it the key isn' t in the ! map. Often, the monad to use is , so you get either  ( result) or . FO(log n)". Is the key a member of the map? GO(log n)&. Is the key not a member of the map? O(log n). Find the value at a key.  Calls $ when the element can not be found. HO(log n). The expression (H def k map) returns  the value at key k or returns def! when the key is not in the map. IO(1). The empty map. JO(1). A map with a single element. KO(log n)). Insert a new key and value in the map. C If the key is already present in the map, the associated value is ( replaced with the supplied value, i.e. K is equivalent to  L . LO(log n)$. Insert with a combining function.  L 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 the pair (key, f new_value old_value). MSame as L2, but the combining function is applied strictly. NO(log n)$. Insert with a combining function.  N 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 the pair (key,f key new_value old_value). 9 Note that the key passed to f is the same key passed to N. OSame as N2, but the combining function is applied strictly. PO(log n). The expression (P f k x map) 0 is a pair where the first element is equal to (E k map) " and the second element equal to (N f k x map). QO(log n)?. Delete a key and its value from the map. When the key is not 4 a member of the map, the original map is returned. RO(log n)8. Adjust a value at a specific key. When the key is not 4 a member of the map, the original map is returned. SO(log n)8. Adjust a value at a specific key. When the key is not 4 a member of the map, the original map is returned. TO(log n). The expression (T f k map) updates the value x  at k (if it is in the map). If (f x) is , the element is  deleted. If it is ( y ), the key k is bound to the new value y. UO(log n). The expression (U f k map) updates the  value x at k (if it is in the map). If (f k x) is , # the element is deleted. If it is ( y ), the key k is bound  to the new value y. VO(log n). Lookup and update. WO(log n). The expression (W f k map) alters the value x at k, or absence thereof.  W7 can be used to insert, delete, or update a value in a @.  In short : E k (W f k m) = f (E k m) XO(log n) . Return the index& of a key. The index is a number from  0 up to, but not including, the D of the map. Calls  when  the key is not a F of the map. YO(log n) . Lookup the index& of a key. The index is a number from  0 up to, but not including, the D of the map. ZO(log n). Retrieve an element by index. Calls  when an  invalid index is used. [O(log n). Update the element at index. Calls  when an  invalid index is used. \O(log n). Delete the element at index.  Defined as (\ i map = [ (k x -> ) i map). ]O(log n). The minimal key of the map. ^O(log n). The maximal key of the map. _O(log n). Delete the minimal key. `O(log n). Delete the maximal key. aO(log n)'. Update the value at the minimal key. bO(log n)'. Update the value at the maximal key. cO(log n)'. Update the value at the minimal key. dO(log n)'. Update the value at the maximal key. eO(log n)\. Retrieves the minimal (key,value) pair of the map, and the map stripped from that element  fail+s (in the monad) when passed an empty map. fO(log n)\. Retrieves the maximal (key,value) pair of the map, and the map stripped from that element  fail+s (in the monad) when passed an empty map. gO(log n). Retrieves the minimal key';s value of the map, and the map stripped from that element  fail+s (in the monad) when passed an empty map. hO(log n). Retrieves the maximal key';s value of the map, and the map stripped from that element  fail+s (in the monad) when passed an empty map. iThe union of a list of maps:  (i ==  Prelude.foldl k I). j9The union of a list of maps, with a combining operation:  (j f ==  Prelude.foldl (l f) I). kO(n+m).  The expression (k t1 t2!) takes the left-biased union of t1 and t2.  It prefers t1& when duplicate keys are encountered,  i.e. (k == l ). ' The implementation uses the efficient  hedge-union algorithm. * Hedge-union is more efficient on (bigset k smallset) lO(n+m)I. Union with a combining function. The implementation uses the efficient  hedge-union algorithm. mO(n+m). H Union with a combining function. The implementation uses the efficient  hedge-union algorithm. * Hedge-union is more efficient on (bigset k smallset). nO(n+m). Difference of two maps. & The implementation uses an efficient hedge algorithm comparable with  hedge-union. oO(n+m)). Difference with a combining function. & The implementation uses an efficient hedge algorithm comparable with  hedge-union. pO(n+m)@. Difference with a combining function. When two equal keys are L encountered, the combining function is applied to the key and both values.  If it returns 7, the element is discarded (proper set difference). If  it returns ( y+), the element is updated with a new value y. & The implementation uses an efficient hedge algorithm comparable with  hedge-union. qO(n+m)4. Intersection of two maps. The values in the first  map are returned, i.e. (q m1 m2 == r  m1 m2). rO(n+m)*. Intersection with a combining function. sO(n+m)*. Intersection with a combining function. + Intersection is more efficient on (bigset q smallset) TintersectionWithKey :: Ord k => (k -> a -> b -> c) -> Map k a -> Map k b -> Map k c "intersectionWithKey f Tip t = Tip "intersectionWithKey f t Tip = Tip 7intersectionWithKey f t1 t2 = intersectWithKey f t1 t2 intersectWithKey f Tip t = Tip intersectWithKey f t Tip = Tip &intersectWithKey f t (Bin _ kx x l r)  = case found of  Nothing -> merge tl tr * Just y -> join kx (f kx y x) tl tr  where % (lt,found,gt) = splitLookup kx t , tl = intersectWithKey f lt l , tr = intersectWithKey f gt r tO(n+m).  This function is defined as (t = u (==)). uO(n+m).  The expression (u f t1 t2 ) returns  if  all keys in t1 are in tree t2 , and when f returns  when A applied to their respective values. For example, the following  expressions are all :  E isSubmapOfBy (==) (fromList [('a',1)]) (fromList [('a',1),('b',2)]) E isSubmapOfBy (<=) (fromList [('a',1)]) (fromList [('a',1),('b',2)]) M isSubmapOfBy (==) (fromList [('a',1),('b',2)]) (fromList [('a',1),('b',2)]) But the following are all : E isSubmapOfBy (==) (fromList [('a',2)]) (fromList [('a',1),('b',2)]) E isSubmapOfBy (<) (fromList [('a',1)]) (fromList [('a',1),('b',2)]) E isSubmapOfBy (==) (fromList [('a',1),('b',2)]) (fromList [('a',1)]) vO(n+m):. Is this a proper submap? (ie. a submap but not equal).  Defined as (v = w (==)). wO(n+m)9. Is this a proper submap? (ie. a submap but not equal).  The expression (w f m1 m2 ) returns  when  m1 and m2 are not equal,  all keys in m1 are in m2 , and when f returns  when A applied to their respective values. For example, the following  expressions are all :  E isProperSubmapOfBy (==) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) E isProperSubmapOfBy (<=) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) But the following are all : K isProperSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1),(2,2)]) E isProperSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1)]) K isProperSubmapOfBy (<) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) xO(n)0. Filter all values that satisfy the predicate. yO(n). Filter all keys/#values that satisfy the predicate. zO(n)8. partition the map according to a predicate. The first F map contains all elements that satisfy the predicate, the second all , elements that fail the predicate. See also . {O(n)8. partition the map according to a predicate. The first F map contains all elements that satisfy the predicate, the second all , elements that fail the predicate. See also . |O(n). Map values and collect the  results. }O(n) . Map keys/values and collect the  results. ~O(n). Map values and separate the  and  results. O(n) . Map keys/values and separate the  and  results. O(n)-. Map a function over all values in the map. O(n)-. Map a function over all values in the map. O(n). The function  threads an accumulating 6 argument through the map in ascending order of keys. O(n). The function  threads an accumulating 6 argument through the map in ascending order of keys. O(n). The function  threads an accumulating 7 argument throught the map in ascending order of keys. O(n). The function  threads an accumulating 8 argument throught the map in descending order of keys.  O(n*log n).   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 F keys to the same new key. In this case the value at the smallest of  these keys is retained.  O(n*log n).   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 G keys to the same new key. In this case the associated values will be  combined using c. O(n).   f s ==  f s, but works only when f  is strictly monotonic.   The precondition is not checked.  Semi-formally, we have: / and [x < y ==> f x < f y | x <- ls, y <- ls] = ==> mapKeysMonotonic f s == mapKeys f s  where ls = keys s O(n)(. Fold the values in the map, such that   f z ==  Prelude.foldr f z . .  For example,  elems map = fold (:) [] map O(n)1. Fold the keys and values in the map, such that   f z ==  Prelude.foldr ( f) z . .  For example, 1 keys map = foldWithKey (\k x ks -> k:ks) [] map O(n). In-order fold. O(n). Post-order fold. O(n). Pre-order fold. O(n). F Return all elements of the map in the ascending order of their keys. O(n)1. Return all keys of the map in ascending order. O(n)". The set of all keys of the map. O(n). Return all key//value pairs in the map in ascending key order.  O(n*log n) . Build a map from a list of key/value pairs. See also .  O(n*log n) . Build a map from a list of key/0value pairs with a combining function. See also .  O(n*log n) . Build a map from a list of key/0value pairs with a combining function. See also . O(n). Convert to a list of key/ value pairs. O(n) . Convert to an ascending list. O(n). O(n)5. Build a map from an ascending list in linear time.  :The precondition (input list is ascending) is not checked. O(n)^. Build a map from an ascending list in linear time with a combining function for equal keys.  :The precondition (input list is ascending) is not checked. O(n);. Build a map from an ascending list in linear time with a $ combining function for equal keys.  :The precondition (input list is ascending) is not checked. O(n)J. Build a map from an ascending list of distinct elements in linear time.   The precondition is not checked. O(log n). The expression ( k map ) is a pair  (map1,map2) where  the keys in map1 are smaller than k and the keys in map2 larger than k. Any key equal to k is found in neither map1 nor map2. O(log n). The expression ( k map) splits a map just  like  but also returns E k map. O(log n). O(log n) . Performs a $ but also returns whether the pivot ( element was found in the original set. O(log n)'. Delete and find the minimal element. O(log n)'. Delete and find the maximal element. O(n);. Show the tree that implements the map. The tree is shown " in a compressed, hanging format. O(n). The expression ( showelem hang wide map) shows @ the tree that implements the map. Elements are shown using the showElem function. If hang is  , a hanging5 tree is shown otherwise a rotated tree is shown. If  wide is ", an extra wide version is shown. : Map> let t = fromDistinctAscList [(x,()) | x <- [1..5]] A Map> putStrLn $ showTreeWith (\k x -> show (k,x)) True False t  (4,())  +--(2,())  | +--(1,())  | +--(3,())  +--(5,())  @ Map> putStrLn $ showTreeWith (\k x -> show (k,x)) True True t  (4,())  |  +--(2,())  | |  | +--(1,())  | |  | +--(3,())  |  +--(5,())  A Map> putStrLn $ showTreeWith (\k x -> show (k,x)) False True t  +--(5,())  |  (4,())  |  | +--(3,())  | |  +--(2,())  |  +--(1,()) O(n)/. Test if the internal map structure is valid. Exported only for Debug.QuickCheck ]@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~]@ABCDFGEHIJKLNPMOQRSTUVWklmijnopqrsxyz{|}~tuvwYXZ[\]^_`abcdghef]@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~portable provisionallibraries@haskell.orgLA set of integers. O(n+m). See . O(1). Is the set empty? O(n). Cardinality of the set.  O(min(n,W))$. Is the value a member of the set?  O(min(n,W))!. Is the element not in the set? O(1). The empty set. O(1). A set of one element.  O(min(n,W))4. Add a value to the set. When the value is already ; an element of the set, it is replaced by the new one, ie.   is left-biased.  O(min(n,W))). Delete a value in the set. Returns the . original set when the value was not present. The union of a list of sets. O(n+m). The union of two sets. O(n+m) . Difference between two sets. O(n+m)!. The intersection of two sets. O(n+m)9. Is this a proper subset? (ie. a subset but not equal). O(n+m). Is this a subset?  (s1  s2) tells whether s1 is a subset of s2. O(n)3. Filter all elements that satisfy some predicate. O(n)1. partition the set according to some predicate.  O(min(n,W)). The expression ( x set ) is a pair  (set1,set2)  where all elements in set1 are lower than x and all elements in  set2 larger than x. ? split 3 (fromList [1..5]) == (fromList [1,2], fromList [3,4])  O(min(n,W)) . Performs a $ but also returns whether the pivot ( element was found in the original set.  O(min(n,W))O. Retrieves the maximal key of the set, and the set stripped from that element  fail+s (in the monad) when passed an empty set.  O(min(n,W))O. Retrieves the minimal key of the set, and the set stripped from that element  fail+s (in the monad) when passed an empty set.  O(min(n,W))'. Delete and find the minimal element. 2 deleteFindMin set = (findMin set, deleteMin set)  O(min(n,W))'. Delete and find the maximal element. 2 deleteFindMax set = (findMax set, deleteMax set)  O(min(n,W)) . The minimal element of a set.  O(min(n,W)) . The maximal element of a set.  O(min(n,W)). Delete the minimal element.  O(min(n,W)). Delete the maximal element.  O(n*min(n,W)).   f s! is the set obtained by applying f to each element of s. It'>s worth noting that the size of the result may be smaller if,  for some (x,y), x /= y && f x == f y O(n);. Fold over the elements of a set in an unspecified order.  sum set == fold (+) 0 set  elems set == fold (:) [] set O(n)B. The elements of a set. (For sets, this is equivalent to toList) O(n)). Convert the set to a list of elements. O(n)4. Convert the set to an ascending list of elements.  O(n*min(n,W))(. Create a set from a list of integers.  O(n*min(n,W))2. Build a set from an ascending list of elements.  O(n*min(n,W));. Build a set from an ascending list of distinct elements. O(n);. Show the tree that implements the set. The tree is shown " in a compressed, hanging format. O(n). The expression ( hang wide map) shows & the tree that implements the set. If hang is  , a hanging5 tree is shown otherwise a rotated tree is shown. If  wide is ", an extra wide version is shown. &&&portable provisionallibraries@haskell.orgqA map of integers to values a.  O(min(n,W)). Find the value at a key.  Calls $ when the element can not be found. O(n+m). See . O(1). Is the map empty? O(n)!. Number of elements in the map.  O(min(n,W))". Is the key a member of the map? O(log n)&. Is the key not a member of the map?  O(min(n,W))(. Lookup the value at a key in the map.  O(min(n,W)). The expression ( def k map)  returns the value at key k or returns def when the key is not an  element of the map. O(1). The empty map. O(1). A map of one element.  O(min(n,W)). Insert a new key/value pair in the map. C If the key is already present in the map, the associated value is ( replaced with the supplied value, i.e.  is equivalent to   .  O(min(n,W))$. Insert with a combining function.   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 new_value old_value.  O(min(n,W))$. Insert with a combining function.   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 new_value old_value.  O(min(n,W)). The expression ( f k x map) 0 is a pair where the first element is equal to ( k map) " and the second element equal to ( f k x map).  O(min(n,W))?. Delete a key and its value from the map. When the key is not 4 a member of the map, the original map is returned.  O(min(n,W))8. Adjust a value at a specific key. When the key is not 4 a member of the map, the original map is returned.  O(min(n,W))8. Adjust a value at a specific key. When the key is not 4 a member of the map, the original map is returned.  O(min(n,W)). The expression ( f k map) updates the value x  at k (if it is in the map). If (f x) is , the element is  deleted. If it is ( y ), the key k is bound to the new value y.  O(min(n,W)). The expression ( f k map) updates the value x  at k (if it is in the map). If (f k x) is , the element is  deleted. If it is ( y ), the key k is bound to the new value y.  O(min(n,W)). Lookup and update. O(log n). The expression ( f k map) alters the value x at k, or absence thereof.  7 can be used to insert, delete, or update a value in a Map.  In short :  k ( f k m) = f ( k m) The union of a list of maps. 8The union of a list of maps, with a combining operation O(n+m)(. The (left-biased) union of two maps. ? It prefers the first map when duplicate keys are encountered,  i.e. ( ==  ). O(n+m)(. The union with a combining function. O(n+m)(. The union with a combining function. O(n+m)0. Difference between two maps (based on keys). O(n+m)). Difference with a combining function. O(n+m)@. Difference with a combining function. When two equal keys are L encountered, the combining function is applied to the key and both values.  If it returns 4, the element is discarded (proper set difference).  If it returns ( y+), the element is updated with a new value y. O(n+m)?. The (left-biased) intersection of two maps (based on keys). O(n+m)/. The intersection with a combining function. O(n+m)/. The intersection with a combining function. O(log n)'. Update the value at the minimal key. O(log n)'. Update the value at the maximal key. O(log n)_. Retrieves the maximal (key,value) couple of the map, and the map stripped from that element.  fail+s (in the monad) when passed an empty map. O(log n)_. Retrieves the minimal (key,value) couple of the map, and the map stripped from that element.  fail+s (in the monad) when passed an empty map. O(log n)'. Update the value at the maximal key. O(log n)'. Update the value at the minimal key. O(log n)P. Retrieves the maximal key of the map, and the map stripped from that element.  fail+s (in the monad) when passed an empty map. O(log n)P. Retrieves the minimal key of the map, and the map stripped from that element.  fail+s (in the monad) when passed an empty map. O(log n)'. Delete and find the maximal element. O(log n)'. Delete and find the minimal element. O(log n). The minimal key of the map. O(log n). The maximal key of the map. O(log n). Delete the minimal key. O(log n). Delete the maximal key. O(n+m):. Is this a proper submap? (ie. a submap but not equal).  Defined as ( =  (==)). O(n+m)9. Is this a proper submap? (ie. a submap but not equal).  The expression ( f m1 m2 ) returns  when  m1 and m2 are not equal,  all keys in m1 are in m2 , and when f returns  when A applied to their respective values. For example, the following  expressions are all :  E isProperSubmapOfBy (==) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) E isProperSubmapOfBy (<=) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) But the following are all : K isProperSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1),(2,2)]) E isProperSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1)]) K isProperSubmapOfBy (<) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) O(n+m). Is this a submap?  Defined as ( =  (==)). O(n+m).  The expression ( f m1 m2 ) returns  if  all keys in m1 are in m2 , and when f returns  when A applied to their respective values. For example, the following  expressions are all :  ? isSubmapOfBy (==) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) ? isSubmapOfBy (<=) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) E isSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1),(2,2)]) But the following are all : ? isSubmapOfBy (==) (fromList [(1,2)]) (fromList [(1,1),(2,2)]) > isSubmapOfBy (<) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) ? isSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1)]) O(n)-. Map a function over all values in the map. O(n)-. Map a function over all values in the map. O(n). The function  threads an accumulating 6 argument through the map in ascending order of keys. O(n). The function  threads an accumulating 6 argument through the map in ascending order of keys. O(n). The function  threads an accumulating 6 argument through the map in ascending order of keys. O(n). The function  threads an accumulating 8 argument throught the map in descending order of keys. O(n)1. Filter all values that satisfy some predicate. O(n). Filter all keys/$values that satisfy some predicate. O(n);. partition the map according to some predicate. The first F map contains all elements that satisfy the predicate, the second all , elements that fail the predicate. See also . O(n);. partition the map according to some predicate. The first F map contains all elements that satisfy the predicate, the second all , elements that fail the predicate. See also . O(n). Map values and collect the  results. O(n) . Map keys/values and collect the  results. O(n). Map values and separate the  and  results. O(n) . Map keys/values and separate the  and  results. O(log n). The expression ( 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. O(log n) . Performs a $ but also returns whether the pivot $ key was found in the original map. O(n)(. Fold the values in the map, such that   f z ==  Prelude.foldr f z . .  For example,  elems map = fold (:) [] map O(n)1. Fold the keys and values in the map, such that   f z ==  Prelude.foldr ( f) z .  .  For example, 1 keys map = foldWithKey (\k x ks -> k:ks) [] map O(n). F Return all elements of the map in the ascending order of their keys. O(n)1. Return all keys of the map in ascending order.   O(n*min(n,W))". The set of all keys of the map.  O(n). Return all key//value pairs in the map in ascending key order.  O(n)". Convert the map to a list of key/ value pairs.  O(n)". Convert the map to a list of key/value pairs where the  keys are in ascending order.   O(n*min(n,W))!. Create a map from a list of key/ value pairs.  O(n*min(n,W))". Create a map from a list of key/0value pairs with a combining function. See also .  O(n*min(n,W))!. Build a map from a list of key/Bvalue pairs with a combining function. See also fromAscListWithKey'.  O(n*min(n,W)) . Build a map from a list of key/value pairs where " the keys are in ascending order.  O(n*min(n,W)) . Build a map from a list of key/value pairs where K the keys are in ascending order, with a combining function on equal keys.  O(n*min(n,W)) . Build a map from a list of key/value pairs where K the keys are in ascending order, with a combining function on equal keys.  O(n*min(n,W)) . Build a map from a list of key/value pairs where 3 the keys are in ascending order and all distinct. O(n);. Show the tree that implements the map. The tree is shown " in a compressed, hanging format. O(n). The expression ( hang wide map) shows & the tree that implements the map. If hang is  , a hanging5 tree is shown otherwise a rotated tree is shown. If  wide is ", an extra wide version is shown.      S     S     J     portable experimentallibraries@haskell.orgMulti-way trees, also known as  rose trees.  label value zero or more child trees &Neat 2-dimensional drawing of a tree. (Neat 2-dimensional drawing of a forest. %The elements of a tree in pre-order. *Lists of nodes at each level of the tree. Build a tree from a seed value  *Build a forest from a list of seed values !+Monadic tree builder, in depth-first order "-Monadic forest builder, in depth-first order #.Monadic tree builder, in breadth-first order, ! using an algorithm adapted from  JBreadth-First Numbering: Lessons from a Small Exercise in Algorithm Design,  by Chris Okasaki, ICFP'00. $0Monadic forest builder, in breadth-first order, ! using an algorithm adapted from  JBreadth-First Numbering: Lessons from a Small Exercise in Algorithm Design,  by Chris Okasaki, ICFP'00.  !"#$ !"#$ !"#$portable experimentallibraries@haskell.org6%-An edge from the first vertex to the second. &The bounds of a (. 'EAdjacency list representation of a graph, mapping each vertex to its  list of successors. (/Table indexed by a contiguous set of vertices. )%Abstract representation of vertices. *Strongly connected component. +A maximal set of mutually  reachable vertices. ,A single vertex that is not  in any cycle. -9The vertices of a list of strongly connected components. .0The vertices of a strongly connected component. /EThe strongly connected components of a directed graph, topologically  sorted. 8The graph: a list of nodes uniquely identified by keys, 6 with a list of keys of nodes this node has edges to. ' The out-list may contain keys that don't correspond to - nodes of the graph; such edges are ignored. 0EThe strongly connected components of a directed graph, topologically & sorted. The function is the same as /, except that / all the information about each node retained. 1 This interface is used when you expect to apply * to  (some of) the result of * , so you don't want to lose the  dependency information. 8The graph: a list of nodes uniquely identified by keys, 6 with a list of keys of nodes this node has edges to. ' The out-list may contain keys that don't correspond to - nodes of the graph; such edges are ignored. Topologically sorted 1All vertices of a graph. 2All edges of a graph. 3$Build a graph from a list of edges. 4+The graph obtained by reversing all edges. 5.A table of the count of edges from each node. 6.A table of the count of edges into each node. 7 Identical to 8, except that the return value B does not include the function which maps keys to vertices. This  version of 8! is for backwards compatibility. 8@Build a graph from a list of nodes uniquely identified by keys, > with a list of keys of nodes this node should have edges to. ' The out-list may contain keys that don't correspond to ' nodes of the graph; they are ignored. 9FA spanning forest of the graph, obtained from a depth-first search of > the graph starting from each vertex in an unspecified order. :EA spanning forest of the part of the graph reachable from the listed G vertices, obtained from a depth-first search of the graph starting at ' each of the listed vertices in order.  !"#$%&'(;!A topological sort of the graph. A The order is partially specified by the condition that a vertex i  precedes j whenever j is reachable from i but not vice versa. <%The connected components of a graph. H Two vertices are connected if there is a path between them, traversing  edges in either direction. )=.The strongly connected components of a graph. *+,->2A list of vertices reachable from a given vertex. ?/Is the second vertex reachable from the first? @'The biconnected components of a graph. B An undirected graph is biconnected if the deletion of any vertex  leaves it connected. ./0%&'()*+,-./0123456789:;<=>?@/0*,+.-'(&%)87341256:9;<=@>?%&'()*,++,-./0123456789:;<=>?@1      !"#$%&'()*+,-./0123456789:;<=>?@ABCDE!"F#$G%HIJKL&MNOPQRSTU)*+,VWXYZ[?@-\.]^/_`0abcdef1g2hijkl3mnopqr5s6tuvwx789yz:;{=>ABC|!"#$%&-./0'(12;<@?=>)*+,356789:AB}~E!"#$FG%HJL&MNOP-\.]^/_`0abXY[ZWV@?>=)*+,efcd3mno1g2hijkl;{5s6tuv78wx9yz:AB";7{      < !"#F$%&'()*+,-./012345 !"#$6&78*+9-./012345:;<==>?@ABCDEFGHIJKLMNOPQRSTUVcontainers-0.1.0.1 Data.SequenceData.SetData.Map Data.IntSet Data.IntMap Data.Tree Data.GraphViewR:>EmptyRViewL:<EmptyLSeqempty singleton<||>><nulllengthviewlviewrindexupdateadjusttakedropsplitAtfromListreverseSet\\sizemember notMemberinsertdeleteisProperSubsetOf isSubsetOffindMinfindMax deleteMin deleteMaxunionsunion difference intersectionfilter partitionmap mapMonotonicfoldelemstoList toAscList fromAscListfromDistinctAscListsplit splitMember deleteFindMin deleteFindMaxminViewmaxViewshowTree showTreeWithvalidMap!lookupfindWithDefault insertWith insertWith' insertWithKeyinsertWithKey'insertLookupWithKey adjustWithKey updateWithKeyupdateLookupWithKeyalter findIndex lookupIndexelemAtupdateAtdeleteAt updateMin updateMaxupdateMinWithKeyupdateMaxWithKeyminViewWithKeymaxViewWithKey unionsWith unionWith unionWithKeydifferenceWithdifferenceWithKeyintersectionWithintersectionWithKey isSubmapOf isSubmapOfByisProperSubmapOfisProperSubmapOfBy filterWithKeypartitionWithKeymapMaybemapMaybeWithKey mapEithermapEitherWithKey mapWithKeymapAccummapAccumWithKeymapKeys mapKeysWithmapKeysMonotonic foldWithKeykeyskeysSetassocs fromListWithfromListWithKeyfromAscListWithfromAscListWithKey splitLookupIntSetKeyIntMapForestTreeNode rootLabel subForestdrawTree drawForestflattenlevels unfoldTree unfoldForest unfoldTreeM unfoldForestMunfoldTreeM_BFunfoldForestM_BFEdgeBoundsGraphTableVertexSCC CyclicSCC AcyclicSCC flattenSCCs flattenSCCstronglyConnCompstronglyConnCompRverticesedgesbuildG transposeG outdegreeindegreegraphFromEdges'graphFromEdgesdffdfstopSort componentsscc reachablepathbccSplitPlaceMaybe2Just2Nothing2ElemgetElemNode3Node2DigitFourThreeTwoOne FingerTreeDeepSingleEmptySizedseqTcdeep digitToTreenode2node3 nodeToDigitconsTreesnocTree appendTree0 addDigits0 appendTree1 addDigits1 appendTree2 addDigits2 appendTree3 addDigits3 appendTree4 addDigits4viewLTc viewLTreeviewRTc viewRTree lookupTree lookupNode lookupDigit adjustTree adjustNode adjustDigit splitTreedeepLdeepR splitNode splitDigitbase Data.FoldableFoldable reverseTree reverseDigit reverseNodeSizeBinTipGHC.ListfoldlfoldrshowSetsetTctrim trimMemberLofilterGtfilterLtjoin insertMax insertMinmergegluedeltaratiobalancebinghc-primGHC.BoolTrue showsTree showsTreeHang showsBarsbalancedGHC.Errerror Data.MaybeMaybeJustNothinglookup' lookupAssocfindGHC.BaseconstfirstFalse Data.EitherLeftRight mapAccumL mapAccumR Data.Tupleuncurryfoldi toDescList trimLookupLosplitLookupWithKeyreadPairshowMapmapTcIdentity runIdentityMaskPrefixNilNat natFromInt intFromNatshiftRLlookupNinsertRsplit' splitMember'maxViewUnsignedminViewUnsignedequalnequalintSetTczeronomatchmatchmaskzeroNmaskWshorter branchMaskhighestBitMaskfind' splitLookup'foldr'intMapTctreeTcdraw unfoldForestQSetMrunSetMmapTreverseEgenerateprunechopruncontainsincludepreorder preorderFtabulatepreArr postorder postorderFpostOrd undirectedtreebackcrossforwarddo_labelbicompscollect