h&F      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  Safe-Inferred6 Safe-Inferred6 Safe-Inferred56"/pqueueA specialized type intended to organize the return of extract-min queries from a binomial forest. We walk all the way through the forest, and then walk backwards.  Extract rk a is the result type of an extract-min operation that has walked as far backwards of rank rk0 -- that is, it has visited every root of rank >= rk.The interpretation of Extract minKey children forest isminKey is the key of the minimum root visited so far. It may have any rank >= rk0. We will denote the root corresponding to minKey as minRoot.children is those children of minRoot which have not yet been merged with the rest of the forest. Specifically, these are the children with rank < rk.forest is an accumulating parameter that maintains the partial reconstruction of the binomial forest without minRoot2. It is the union of all old roots with rank >= rk (except minRoot(), with the set of all children of minRoot with rank >= rk.pqueue$Type corresponding to the Zero rank.pqueueIf |rk| corresponds to rank k, then | rk| corresponds to rank k+1.pqueue'A priority queue with elements of type a<. Getting the size or retrieving the minimum element takes  O(\log n) time.pqueueO(1). The empty priority queue.pqueueO(1)#. Is this the empty priority queue?pqueue O(\log n)&. The number of elements in the queue.pqueue O(\log n). Returns the minimum element of the queue, if the queue is nonempty.pqueueRetrieves the minimum element of the queue, and the queue stripped of that element, or  if passed an empty queue.pqueueO(1)3. Construct a priority queue with a single element.pqueue Amortized O(1) , worst-case  O(\log n),. Insert an element into the priority queue.pqueue O(\log n) , but a fast O(1) average when inserting repeatedly in an empty queue or at least around  O(\log n) times into a nonempty one. Insert an element into the priority queue. This is good for -like operations.pqueue Amortized O(\log \min(n,m)) , worst-case O(\log \max(n,m))(. Take the union of two priority queues.pqueuejpqueue O(\log n). Returns the minimum element. Throws an error on an empty queue.pqueue O(\log n). Deletes the minimum element. If the queue is empty, does nothing.pqueue O(\log n). Extracts the minimum element. Throws an error on an empty queue.pqueue O(k \log n)0/. Index (subscript) operator, starting from 0.  queue !! k returns the (k+1)1th smallest element in the queue. Equivalent to toAscList queue !! k.pqueue, applied to a predicate p and a queue queue2, returns the longest prefix (possibly empty) of queue of elements that satisfy p.pqueue p queue# returns the queue remaining after  p queue.pqueue, applied to a predicate p and a queue queue, returns a tuple where first element is longest prefix (possibly empty) of queue of elements that satisfy p2 and second element is the remainder of the queue.pqueue, applied to a predicate p and a queue queue, returns a tuple where first element is longest prefix (possibly empty) of queue of elements that do not satisfy p2 and second element is the remainder of the queue.pqueue O(k \log n)/.  k, applied to a queue queue!, returns a list of the smallest k elements of queue, or all elements of queue itself if k >=  queue.pqueue O(k \log n)/.  k, applied to a queue queue , returns queue with the smallest k) elements deleted, or an empty queue if  k >= size queue.pqueue O(k \log n)/. Equivalent to ( k queue,  k queue).pqueueO(n)5. Returns the queue with all elements not satisfying p removed.pqueueO(n). Returns a pair where the first queue contains all elements satisfying p=, and the second queue contains all elements not satisfying p.pqueueO(n). Creates a new priority queue containing the images of the elements of this queue. Equivalent to  .   f . toList.pqueue O(n \log n). Returns the elements of the priority queue in ascending order. Equivalent to .;If the order of the elements is irrelevant, consider using .pqueue O(n \log n). Performs a left fold on the elements of a priority queue in descending order. (foldlDesc f z q == foldrAsc (flip f) z q.pqueueO(n)7. Constructs a priority queue from an descending list. Warning": Does not check the precondition.pqueueEquivalent to .,(c) Louis Wasserman 2010 BSD-stylelibraries@haskell.org experimentalportable Safe-Inferred6Lhpqueue O(\log n). Returns the minimum element. Throws an error on an empty queue.pqueueO(1):. The top (maximum) element of the queue, if there is one.pqueue O(\log n). Deletes the maximum element. If the queue is empty, does nothing.pqueue O(\log n). Extracts the maximum element. Throws an error on an empty queue.pqueue O(\log n). Extract the top (maximum) element of the sequence, if there is one.pqueue O(k \log n)0/. Index (subscript) operator, starting from 0.  queue !! k returns the (k+1)0th largest element in the queue. Equivalent to toDescList queue !! k.pqueue, applied to a predicate p and a queue queue2, returns the longest prefix (possibly empty) of queue of elements that satisfy p.pqueue p queue# returns the queue remaining after  p queue.pqueue, applied to a predicate p and a queue queue, returns a tuple where first element is longest prefix (possibly empty) of queue of elements that satisfy p2 and second element is the remainder of the queue.pqueue, applied to a predicate p and a queue queue, returns a tuple where first element is longest prefix (possibly empty) of queue of elements that do not satisfy p2 and second element is the remainder of the queue.pqueue O(k \log n)/.  k, applied to a queue queue!, returns a list of the greatest k elements of queue, or all elements of queue itself if k >=  queue.pqueue O(k \log n)/.  k, applied to a queue queue , returns queue with the greatest k) elements deleted, or an empty queue if  k >= size queue.pqueue O(k \log n)/. Equivalent to ( k queue,  k queue).pqueueO(n)5. Returns the queue with all elements not satisfying p removed.pqueueO(n). Returns a pair where the first queue contains all elements satisfying p=, and the second queue contains all elements not satisfying p.pqueueO(n). Creates a new priority queue containing the images of the elements of this queue. Equivalent to  .   f . toList.pqueue O(n \log n). Returns the elements of the priority queue in descending order. Equivalent to .;If the order of the elements is irrelevant, consider using .pqueue O(n \log n). Performs a right fold on the elements of a priority queue in descending order.pqueue O(n \log n). Performs a right fold on the elements of a priority queue in ascending order.pqueue O(n \log n). Performs a left fold on the elements of a priority queue in ascending order.pqueue O(n \log n). Performs a left fold on the elements of a priority queue in descending order.pqueueO(n)6. Constructs a priority queue from an ascending list. Warning": Does not check the precondition.pqueueO(n)6. Constructs a priority queue from a descending list. Warning": Does not check the precondition.pqueueEquivalent to .pqueue(Convert to a list in an arbitrary order.pqueue Get the number of elements in a .+ Safe-Inferred )*06O!pqueue Conceptually, data Nattish :: forall k. k -> (k -> k) -> k -> Type where Zeroy :: Nattish zero succ zero Succy :: !(Nattish zero succ n) -> Nattish zero succ (succ n) This abstracts over the zero and successor constructors, so it can be used in any sufficiently Nat-like context. In our case, we can use it for the Zero and Succ constructors of both MinQueue and  MinPQueue . With recent versions of GHC, Nattish is actually represented as a machine integer, so it is very fast to work with. Safe-Inferred )*6qq4pqueue/Natural numbers revealing whether something is  or .pqueueA specialized type intended to organize the return of extract-min queries from a binomial forest. We walk all the way through the forest, and then walk backwards.  Extract rk a is the result type of an extract-min operation that has walked as far backwards of rank rk0 -- that is, it has visited every root of rank >= rk.The interpretation of %Extract minKey minVal children forest isminKey is the key of the minimum root visited so far. It may have any rank >= rk0. We will denote the root corresponding to minKey as minRoot.minVal is the value corresponding to minKey.children is those children of minRoot which have not yet been merged with the rest of the forest. Specifically, these are the children with rank < rk.forest is an accumulating parameter that maintains the partial reconstruction of the binomial forest without minRoot2. It is the union of all old roots with rank >= rk (except minRoot(), with the set of all children of minRoot with rank >= rk. Note that forest4 is lazy, so if we discover a smaller key than minKey+ later, we haven't wasted significant work.pqueue$A priority queue where keys of type k$ are annotated with values of type a. The queue supports extracting the key-value pair with minimum key.pqueue The union of a list of queues: ( ==  " ).pqueueO(1)#. Returns the empty priority queue.pqueueO(1)). Checks if this priority queue is empty.pqueueO(1)*. Returns the size of this priority queue.pqueueO(1)(. Constructs a singleton priority queue. pqueue Amortized O(1) , worst-case  O(\log n)<. Inserts an element with the specified key into the queue.!pqueueO(n) (an earlier implementation had O(1) but was buggy). Insert an element with the specified key into the priority queue, putting it behind elements whose key compares equal to the inserted one."pqueue Amortized O(\log \min(n_1,n_2)) , worst-case O(\log \max(n_1,n_2))1. Returns the union of the two specified queues.#pqueueO(1). The minimal (key, element) in the queue, if the queue is nonempty.$pqueueO(1). Alter the value at the minimum key. If the queue is empty, does nothing.pqueueO(1)9 per operation. Alter the value at the minimum key in an / context. If the queue is empty, does nothing.%pqueue O(\log n) . (Actually O(1) if there's no deletion.) Update the value at the minimum key. If the queue is empty, does nothing.pqueue O(\log n) per operation. (Actually O(1) if there's no deletion.) Update the value at the minimum key in an / context. If the queue is empty, does nothing.&pqueue O(\log n). Retrieves the minimal (key, value) pair of the map, and the map stripped of that element, or  if passed an empty map.'pqueueO(n).. Map a function over all values in the queue.(pqueueO(n). ( f q == mapKeys f q, but only works when f is (weakly) monotonic.  The precondition is not checked., This function has better performance than mapKeys.Note: if the given function returns bottom for any of the keys in the queue, then the portion of the queue which is bottom is  unspecified.)pqueueO(n). Map values and collect the  results.*pqueueO(n). Map values and separate the  and  results.+pqueue O(n \log n)2. Fold the keys and values in the map, such that + f z q ==  ( f) z (- q).=If you do not care about the traversal order, consider using 3.,pqueue O(n \log n)2. Fold the keys and values in the map, such that , f z q ==  ( . f) z (- q).=If you do not care about the traversal order, consider using 5.-pqueue O(n \log n):. Return all (key, value) pairs in ascending order by key..pqueue O(n \log n);. Return all (key, value) pairs in descending order by key./pqueueO(n). Build a priority queue from an ascending list of (key, value) pairs.  The precondition is not checked.0pqueueO(n). Returns all (key, value) pairs in the queue in no particular order.1pqueueO(n). An unordered right fold over the elements of the queue, in no particular order.pqueueEquivalent to  ', save the assumption that this key is <= every other key in the map.  The precondition is not checked.pqueueEquivalent to  ', save the assumption that this key is <= every other key in the map.  The precondition is not checked. Additionally, this eagerly constructs the new portion of the spine.pqueueInserts an entry with key >= every key in the map. Assumes and preserves an extra invariant: the roots of the binomial trees are decreasing along the spine.2pqueueO(n)5. Constructs a priority queue from an unordered list.pqueueO(1). Returns a binomial tree of rank zero containing this key and value.pqueueO(1)9. Takes the union of two binomial trees of the same rank.pqueueTakes the union of two binomial forests, starting at the same rank. Analogous to binary addition.pqueueTakes the union of two binomial forests, starting at the same rank, with an additional tree. Analogous to binary addition when a digit has been carried.pqueueInserts a binomial tree into a binomial forest. Analogous to binary incrementation.pqueueInserts a binomial tree into a binomial forest. Analogous to binary incrementation. Forces the rebuilt portion of the spine.pqueueInserts a binomial tree into a binomial forest. Assumes that the root of this tree is less than all other roots. Analogous to binary incrementation. Equivalent to  (_ _ -> True).pqueueInserts a binomial tree into a binomial forest. Assumes that the root of this tree is less than all other roots. Analogous to binary incrementation. Equivalent to  (_ _ -> True)*. Forces the rebuilt portion of the spine.pqueueSee  for invariant info.pqueueWalks backward from the biggest key in the forest, as far as rank rk8. Returns its progress. Each successive application of  extractBin takes amortized O(1)/ time, so applying it from the beginning takes  O(\log n) time.3pqueueO(n). An unordered right fold over the elements of the queue, in no particular order.4pqueueO(n). An unordered monoidal fold over the elements of the queue, in no particular order.5pqueueO(n). An unordered left fold over the elements of the queue, in no particular order. This is rarely what you want; 3 and 6! are more likely to perform well.6pqueueO(n). An unordered strict left fold over the elements of the queue, in no particular order.7pqueue O(n \log n). Traverses the elements of the queue in ascending order by key. (7 f q == /  $  ( f) (- q))If you do not care about the order" of the traversal, consider using 9.5If you are working in a strict monad, consider using 8.8pqueue#A strictly accumulating version of 7. This works well in  and strict State, and is likely what you want for other "strict" monads, where E >>= pure () = E.9pqueueO(n). An unordered traversal over a priority queue, in no particular order. While there is no guarantee in which order the elements are traversed, the resulting priority queue will be perfectly valid.:pqueue O(\log n).  seqSpine q r forces the spine of q and returns r.Note: The spine of a  is stored somewhat lazily. In earlier versions of this package, some operations could produce chains of thunks along the spine, occasionally necessitating manual forcing. Now, all operations are careful to force enough to avoid this problem.pqueueTraverses in ascending order.  is strictly accumulating like 8.pqueueTreats the priority queue as an empty queue or a minimal key-value pair and a priority queue. The constructors, conceptually, are   and  . is nondeterministic; any minimal pair may be chosen as the first. All constructed queues maintain the queue invariants.4 !"#$%&'()*+,-./0123456789:8(c) Louis Wasserman 2010 BSD-stylelibraries@haskell.org experimentalportable Safe-Inferred(6*;pqueueA bidirectional pattern synonym for working with the minimum view of a . Using :<0 to construct a queue performs an insertion in O(1)" amortized time. When matching on  (k, a) :< q , forcing q takes  O(\log n) time.<pqueuepqueue O(\log n). Deletes the minimal (key, element) in the queue. Returns an empty queue if the queue is empty.?pqueue O(\log n):. Delete and find the element with the minimum key. Calls  if empty.@pqueueO(1). Alter the value at the minimum key. If the queue is empty, does nothing.ApqueueO(1)+. Alter the value at the minimum key in an / context. If the queue is empty, does nothing.BpqueueO(1)9 per operation. Alter the value at the minimum key in an / context. If the queue is empty, does nothing.Cpqueue O(\log n) . (Actually O(1) if there's no deletion.) Update the value at the minimum key. If the queue is empty, does nothing.Dpqueue O(\log n) per operation. (Actually O(1) if there's no deletion.) Update the value at the minimum key. If the queue is empty, does nothing.Epqueue O(\log n) per operation. (Actually O(1) if there's no deletion.) Update the value at the minimum key in an / context. If the queue is empty, does nothing.Fpqueue O(\log n). Retrieves the value associated with the minimal key of the queue, and the queue stripped of that element, or  if passed an empty queue.GpqueueO(n).. Map a function over all values in the queue.HpqueueO(n). H f q# is the queue obtained by applying f to each key of q.IpqueueO(n). Map values and collect the  results.JpqueueO(n). Map values and separate the  and  results.KpqueueO(n)/. Filter all values that satisfy the predicate.LpqueueO(n)/. Filter all values that satisfy the predicate.MpqueueO(n). Partition the queue according to a predicate. The first queue contains all elements which satisfy the predicate, the second all elements that fail the predicate.NpqueueO(n). Partition the queue according to a predicate. The first queue contains all elements which satisfy the predicate, the second all elements that fail the predicate.Opqueue O(k \log n)/. Takes the first k/ (key, value) pairs in the queue, or the first n if k >= n. (O k q ==  k (- q))Ppqueue O(k \log n)/. Deletes the first k? (key, value) pairs in the queue, or returns an empty queue if k >= n.Qpqueue O(k \log n)/. Equivalent to (O k q, P k q).RpqueueTakes the longest possible prefix of elements satisfying the predicate. (R p q ==  (p . ) (- q))SpqueueTakes the longest possible prefix of elements satisfying the predicate. (R p q ==  (uncurry p) (- q))TpqueueRemoves the longest possible prefix of elements satisfying the predicate.UpqueueRemoves the longest possible prefix of elements satisfying the predicate.VpqueueEquivalent to (R p q, T p q).WpqueueEquivalent to V ( . p).XpqueueEquivalent to (S p q, U p q).YpqueueEquivalent to X ( k a ->  (p k a)) q.ZpqueueO(n). Build a priority queue from a descending list of (key, value) pairs.  The precondition is not checked.[pqueue O(n \log n)2. Return all keys of the queue in ascending order.\pqueue O(n \log n)=. Return all elements of the queue in ascending order by key.]pqueue O(n \log n). Equivalent to -.5If the traversal order is irrelevant, consider using 0.^pqueue O(n \log n). Equivalent to -._pqueueO(n)6. Return all keys of the queue in no particular order.`pqueueO(n):. Return all elements of the queue in no particular order.apqueueO(n). Equivalent to 0.bpqueueO(n). An unordered left fold over the elements of the queue, in no particular order. This is rarely what you want; 1 and c" are more likely to perform well.cpqueueO(n). An unordered strict left fold over the elements of the queue, in no particular order.dpqueueO(n). An unordered traversal over a priority queue, in no particular order. While there is no guarantee in which order the elements are traversed, the resulting priority queue will be perfectly valid.<; !"#$%&'()*+,-./0123456789:=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd<;<; !"=#>?@A$BCD%EF&G'H(+,78OPQRSTUVXWYKLMNI)J*2/Z[\^-.]143bc56d9_`a0:;58(c) Louis Wasserman 2010 BSD-stylelibraries@haskell.org experimentalportable Safe-Inferred6Wepqueue&A priority queue where values of type a! are annotated with keys of type k>. The queue supports extracting the element with maximum key.fpqueueO(1)#. Returns the empty priority queue.gpqueueO(1)(. Constructs a singleton priority queue.hpqueue Amortized O(1) , worst-case  O(\log n)<. Inserts an element with the specified key into the queue.ipqueueO(n) (an earlier implementation had O(1) but was buggy). Insert an element with the specified key into the priority queue, putting it behind elements whose key compares equal to the inserted one.jpqueue Amortized O(\log \min(n_1,n_2)) , worst-case O(\log \max(n_1,n_2))1. Returns the union of the two specified queues.kpqueue The union of a list of queues: (k ==  j f).lpqueueO(1)). Checks if this priority queue is empty.mpqueueO(1)*. Returns the size of this priority queue.npqueueO(1)1. The maximal (key, element) in the queue. Calls  if empty.opqueueO(1). The maximal (key, element) in the queue, if the queue is nonempty.ppqueue O(\log n):. Delete and find the element with the maximum key. Calls  if empty.qpqueue O(\log n):. Delete and find the element with the maximum key. Calls  if empty.rpqueueO(1). Alter the value at the maximum key. If the queue is empty, does nothing.spqueueO(1): per operation. Alter the value at the maximum key in an . context. If the queue is empty, does nothing.tpqueueO(1). Alter the value at the maximum key. If the queue is empty, does nothing.upqueueO(1): per operation. Alter the value at the maximum key in an . context. If the queue is empty, does nothing.vpqueue O(\log n) . (Actually O(1) if there's no deletion.) Update the value at the maximum key. If the queue is empty, does nothing.wpqueue O(\log n) per operation. (Actually O(1) if there's no deletion.) Update the value at the maximum key in an / context. If the queue is empty, does nothing.xpqueue O(\log n) . (Actually O(1) if there's no deletion.) Update the value at the maximum key. If the queue is empty, does nothing.ypqueue O(\log n) per operation. (Actually O(1) if there's no deletion.) Update the value at the maximum key in an / context. If the queue is empty, does nothing.zpqueue O(\log n). Retrieves the value associated with the maximum key of the queue, and the queue stripped of that element, or  if passed an empty queue.{pqueue O(\log n). Retrieves the maximal (key, value) pair of the map, and the map stripped of that element, or  if passed an empty map.|pqueueO(n).. Map a function over all values in the queue.}pqueueO(n).. Map a function over all values in the queue.~pqueueO(n).. Map a function over all values in the queue.pqueueO(n).  f q == ~ f q, but only works when f is strictly monotonic.  The precondition is not checked., This function has better performance than ~.pqueue O(n \log n)2. Fold the keys and values in the map, such that  f z q ==  ( f) z ( q).=If you do not care about the traversal order, consider using .pqueue O(n \log n)2. Fold the keys and values in the map, such that  f z q ==  ( . f) z ( q).=If you do not care about the traversal order, consider using .pqueue O(n \log n). Traverses the elements of the queue in descending order by key. ( f q ==   $  ( f) ( q))If you do not care about the order" of the traversal, consider using .5If you are working in a strict monad, consider using .pqueue#A strictly accumulating version of . This works well in  and strict State, and is likely what you want for other "strict" monads, where E >>= pure () = E.pqueue O(k \log n)/. Takes the first k/ (key, value) pairs in the queue, or the first n if k >= n. ( k q ==  k ( q))pqueue O(k \log n)/. Deletes the first k? (key, value) pairs in the queue, or returns an empty queue if k >= n.pqueue O(k \log n)/. Equivalent to ( k q,  k q).pqueueTakes the longest possible prefix of elements satisfying the predicate. ( p q ==  (p . ) ( q))pqueueTakes the longest possible prefix of elements satisfying the predicate. ( p q ==  (uncurry p) ( q))pqueueRemoves the longest possible prefix of elements satisfying the predicate.pqueueRemoves the longest possible prefix of elements satisfying the predicate.pqueueEquivalent to ( p q,  p q).pqueueEquivalent to  ( . p).pqueueEquivalent to  (k a ->  (p k a)) q.pqueueEquivalent to  (k a ->  (p k a)) q.pqueueO(n)/. Filter all values that satisfy the predicate.pqueueO(n)/. Filter all values that satisfy the predicate.pqueueO(n). Partition the queue according to a predicate. The first queue contains all elements which satisfy the predicate, the second all elements that fail the predicate.pqueueO(n). Partition the queue according to a predicate. The first queue contains all elements which satisfy the predicate, the second all elements that fail the predicate.pqueueO(n). Map values and collect the  results.pqueueO(n). Map values and collect the  results.pqueueO(n). Map values and separate the  and  results.pqueueO(n). Map values and separate the  and  results.pqueueO(n)=. Build a priority queue from the list of (key, value) pairs.pqueueO(n). Build a priority queue from an ascending list of (key, value) pairs.  The precondition is not checked.pqueueO(n). Build a priority queue from a descending list of (key, value) pairs.  The precondition is not checked.pqueue O(n \log n)3. Return all keys of the queue in descending order.pqueue O(n \log n)>. Return all elements of the queue in descending order by key.pqueue O(n \log n). Equivalent to .pqueue O(n \log n):. Return all (key, value) pairs in ascending order by key.pqueue O(n \log n);. Return all (key, value) pairs in descending order by key.pqueue O(n \log n). Equivalent to .5If the traversal order is irrelevant, consider using .pqueueO(n). An unordered right fold over the elements of the queue, in no particular order.pqueueO(n). An unordered right fold over the elements of the queue, in no particular order.pqueueO(n). An unordered monoidal fold over the elements of the queue, in no particular order.pqueueO(n). An unordered left fold over the elements of the queue, in no particular order. This is rarely what you want;  and " are more likely to perform well.pqueueO(n). An unordered strict left fold over the elements of the queue, in no particular order.pqueueO(n). An unordered left fold over the elements of the queue, in no particular order. This is rarely what you want;  and ! are more likely to perform well.pqueueO(n). An unordered left fold over the elements of the queue, in no particular order.pqueueO(n). An unordered traversal over a priority queue, in no particular order. While there is no guarantee in which order the elements are traversed, the resulting priority queue will be perfectly valid.pqueueO(n). An unordered traversal over a priority queue, in no particular order. While there is no guarantee in which order the elements are traversed, the resulting priority queue will be perfectly valid.pqueueO(n)6. Return all keys of the queue in no particular order.pqueueO(n):. Return all elements of the queue in no particular order.pqueueO(n). Equivalent to .pqueueO(n). Returns all (key, value) pairs in the queue in no particular order.pqueue O(\log n).  seqSpine q r forces the spine of q and returns r.Note: The spine of a e is stored somewhat lazily. In earlier versions of this package, some operations could produce chains of thunks along the spine, occasionally necessitating manual forcing. Now, all operations are careful to force enough to avoid this problem.pqueueTraverses in descending order.  is strictly accumulating like .efghijklmnopqrstuvwxyz{|}~(c) Louis Wasserman 2010 BSD-stylelibraries@haskell.org experimentalportable Safe-Inferred6Hefghijklmnopqrstuvwxyz{|}~efghijklmnopqrstuvwxyz{|}~(c) Louis Wasserman 2010 BSD-stylelibraries@haskell.org experimentalportable Safe-Inferred(6pqueueA bidirectional pattern synonym for working with the minimum view of a  . Using :<0 to construct a queue performs an insertion in O(1)" amortized time. When matching on a :< q , forcing q takes  O(\log n) time.pqueue=  queue.pqueue O(k \log n)/.  k, applied to a queue queue , returns queue with the smallest k) elements deleted, or an empty queue if  k >= size queue.pqueue O(k \log n)/. Equivalent to ( k queue,  k queue).pqueueO(n)5. Returns the queue with all elements not satisfying p removed.pqueueO(n). Returns a pair where the first queue contains all elements satisfying p=, and the second queue contains all elements not satisfying p.pqueueO(n). Creates a new priority queue containing the images of the elements of this queue. Equivalent to  .   f . toList.pqueue O(n \log n). Returns the elements of the priority queue in ascending order. Equivalent to .;If the order of the elements is irrelevant, consider using .pqueue O(n \log n). Performs a left fold on the elements of a priority queue in descending order. (foldlDesc f z q == foldrAsc (flip f) z q.pqueueO(n)7. Constructs a priority queue from an descending list. Warning": Does not check the precondition.pqueueEquivalent to .pqueue=Constructs a priority queue out of the keys of the specified ./ 1    5(c) Louis Wasserman 2010 BSD-stylelibraries@haskell.org experimentalportable Safe-Inferred61.pqueue'A priority queue with elements of type a. Supports extracting the maximum element. Implemented as a wrapper around .pqueueO(1). The empty priority queue.pqueueO(1)#. Is this the empty priority queue?pqueueO(1)&. The number of elements in the queue.pqueueO(1). Returns the maximum element of the queue. Throws an error on an empty queue.pqueueO(1):. The top (maximum) element of the queue, if there is one.pqueue O(\log n). Deletes the maximum element of the queue. Does nothing on an empty queue.pqueue O(\log n). Extracts the maximum element of the queue. Throws an error on an empty queue.pqueue O(\log n). Extract the top (maximum) element of the sequence, if there is one.pqueue O(\log n). Delete the top (maximum) element of the sequence, if there is one.pqueueO(1)3. Construct a priority queue with a single element.pqueueO(1),. Insert an element into the priority queue.pqueueO(\log min(n_1,n_2))(. Take the union of two priority queues.pqueue= n.pqueue O(k \log n)/. Returns the queue with the k1 largest elements deleted, or the empty queue if k >= n.pqueue O(k \log n)/. Equivalent to (take k queue, drop k queue).pqueue, applied to a predicate p and a queue queue2, returns the longest prefix (possibly empty) of queue of elements that satisfy p.pqueue p queue# returns the queue remaining after  p queue.pqueue, applied to a predicate p and a queue queue, returns a tuple where first element is longest prefix (possibly empty) of queue of elements that satisfy p2 and second element is the remainder of the queue.pqueue, applied to a predicate p and a queue queue, returns a tuple where first element is longest prefix (possibly empty) of queue of elements that do not satisfy p2 and second element is the remainder of the queue.pqueueO(n). Returns a queue of those elements which satisfy the predicate.pqueueO(n). Returns a pair of queues, where the left queue contains those elements that satisfy the predicate, and the right queue contains those that do not.pqueueO(n). Maps a function over the elements of the queue, and collects the  values.pqueueO(n). Maps a function over the elements of the queue, and separates the  and  values.pqueueO(n). Creates a new priority queue containing the images of the elements of this queue. Equivalent to  .   f . toList.pqueueO(n). Assumes that the function it is given is monotonic, and applies this function to every element of the priority queue. Does not check the precondition.pqueueO(n)+. Unordered right fold on a priority queue.pqueueO(n).. Unordered monoidal fold on a priority queue.pqueueO(n). Unordered left fold on a priority queue. This is rarely what you want;  and " are more likely to perform well.pqueueO(n)1. Unordered strict left fold on a priority queue.pqueueEquivalent to .pqueueO(n). Returns a list of the elements of the priority queue, in no particular order.pqueue O(n \log n). Performs a right-fold on the elements of a priority queue in ascending order.  f z q ==  (flip f) z q.pqueue O(n \log n). Performs a left-fold on the elements of a priority queue in descending order.  f z q ==  (flip f) z q.pqueue O(n \log n). Performs a right-fold on the elements of a priority queue in descending order.pqueue O(n \log n). Performs a left-fold on the elements of a priority queue in descending order.pqueue O(n \log n). Extracts the elements of the priority queue in ascending order.pqueue O(n \log n). Extracts the elements of the priority queue in descending order.pqueue O(n \log n). Returns the elements of the priority queue in ascending order. Equivalent to .;If the order of the elements is irrelevant, consider using .pqueueO(n)6. Constructs a priority queue from an ascending list. Warning": Does not check the precondition.pqueueO(n)6. Constructs a priority queue from a descending list. Warning": Does not check the precondition.pqueue O(n \log n)5. Constructs a priority queue from an unordered list.pqueueO(n)1. Constructs a priority queue from the keys of a e.pqueue O(\log n).  seqSpine q r forces the spine of q and returns r.Note: The spine of a  is stored somewhat lazily. In earlier versions of this package, some operations could produce chains of thunks along the spine, occasionally necessitating manual forcing. Now, all operations are careful to force enough to avoid this problem... !"#$%&'()*+,-./01 23456789:;&'(/+)<=>?@AB0  CDEFGHIJK L!"MNOPQRSTUVWXYZ[\]^_`a,-bc2 defghijklmnopq 6L7:;@AQRSTUVWXYMNOP!8"9)(Z[\^&']+<=,->?bB_`a/0  CDErTVWQRMO ]sZ`tudefgpv rQRTVWMO!" *+.,-`/#%$s&'](Z)t0wxyz{|}~) !"#$%&'(+,-./0*  C D E r  T V W  Q R M O ] s Z `defgprTVWQRMO )]'/$#%s(Z`u&.0,-+!"  %pqueue-1.5.0.0-Bb28mJup18F5qc5kUNgg8xData.PQueue.MinData.PQueue.Prio.MinData.PQueue.Prio.MaxData.PQueue.MaxData.PQueue.Internals.DownData.PQueue.Internals.FoldableBinomialQueue.InternalsData.PQueue.InternalsEmpty:<BinomialQueue.Min Data.ListmapBinomialQueue.MaxNattishData.PQueue.Prio.InternalsData.PQueue.Prio.Max.InternalsListfoldlfoldrtake takeWhileMinQueueemptynullsizegetMinminView singletoninsertunionunionsmapMaybe mapEitherfoldrAsc foldrDescfoldlAsc toAscList toDescList fromAscListfromListmapUfoldrUfoldlUfoldlU'foldMapUtoListUseqSpine MinPQueue insertBehindadjustMinWithKeyupdateMinWithKeyminViewWithKey mapWithKeymapKeysMonotonicmapMaybeWithKeymapEitherWithKey foldrWithKey foldlWithKey foldrWithKeyUfoldMapWithKeyU foldlWithKeyUfoldlWithKeyU'traverseWithKey mapMWithKeytraverseWithKeyUfindMin deleteMin deleteFindMin adjustMin adjustMinAadjustMinWithKeyA updateMin updateMinAupdateMinWithKeyAmapKeysfilter filterWithKey partitionpartitionWithKeydropsplitAttakeWhileWithKey dropWhiledropWhileWithKeyspanbreak spanWithKey breakWithKey fromDescListkeyselemstoListassocskeysUelemsUassocsU traverseU MaxPQueuefindMaxgetMax deleteMax deleteFindMax adjustMax adjustMaxAadjustMaxWithKeyadjustMaxWithKeyA updateMax updateMaxAupdateMaxWithKeyupdateMaxWithKeyAmaxViewmaxViewWithKey!! foldlDesc keysQueueMaxQueuedelete$fMonoidMaxQueue$fSemigroupMaxQueue$fReadMaxQueue$fShowMaxQueue$fNFDataMaxQueue $fEqMaxQueue $fOrdMaxQueue$fDataMaxQueueDownunDownFoldl'foldl'_FoldMapfoldMap_Foldlfoldl_Foldrfoldr_ExtractZeroSuccbase GHC.MaybeNothing insertEager Data.Foldablefoldl'Just Data.EitherLeftRight mapMonotonicGHC.Basefmap foldrUnfold foldlUnfold extractHeap extractBinskiptip insertMin insertMinQ' insertMin' insertMaxQ' insertMax'merge unionPlusOnecarryincrincr'joinBinMExtractNoYes BinomTree BinomForestNilSkipCons BinomHeap insertMinQ$fDataMinQueueZeroySuccyRankyadjustMinWithKeyA' ApplicativeupdateMinWithKeyA' Data.Tupleuncurrymeld mergeForest carryForestincrMinincrMin'incrMax'extractData.Traversabletraverseghc-prim GHC.TypesIO$fTraversableMinPQueuemapM$fDataMinPQueue Data.DatagfoldlMinPQ.:GHC.ErrerrorGHC.Listsnd GHC.Classesnot$fTraversableMaxPQueueMaxPQ