h*\'      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  0.1.1.0  Safe-Inferred Safe-Inferred*    9   Safe-Inferred  Safe-Inferred" !"#$%&)*+,-./012345678'(9;:<=>?" !"#$%&)*+,-./012345678'(9;:<=>? Safe-Inferred 9Bseqn!A sequence with elements of type a.EseqnThe empty sequence.FseqnA singleton sequence.GseqnO(n) . Create a Seq from a list.ExamplesfromList [8,1,19,11,5,12,12][8,1,19,11,5,12,12]HseqnO(n) . Create a Seq from a reversed list.ExamplesfromRevList "!olleH""Hello!"Iseqn O(\log n). A sequence with a repeated element. If the length is negative, E is returned.Examplesreplicate 3 "ha"["ha","ha","ha"]JseqnO(n). Generate a sequence from a length and an applicative action. If the length is negative, E is returned.Examplesimport System.Random (randomIO)import Data.Word (Word8)#replicateA 5 (randomIO :: IO Word8)[26,134,30,58,221]KseqnO(n). Generate a sequence from a length and a generator. If the length is negative, E is returned.Examplesgenerate 4 (10*) [0,10,20,30]LseqnO(n). Generate a sequence from a length and an applicative generator. If the length is negative, E is returned.MseqnO(n)'. Unfold a sequence from left to right.Exampleslet f (i,a,b) = if i >= 10 then Nothing else Just (a, (i+1, b, a+b))unfoldr f (0,0,1)[0,1,1,2,3,5,8,13,21,34]NseqnO(n)3. Unfold a sequence monadically from left to right.OseqnO(n)'. Unfold a sequence from right to left.Examples9let f i = if i <= 0 then Nothing else Just (i `div` 2, i)unfoldl f 1024#[1,2,4,8,16,32,64,128,256,512,1024]PseqnO(n)3. Unfold a sequence monadically from right to left.QseqnO \left(\sum_i \log n_i \right). Map over a Foldable and concatenate the results.Examples?concatMap (uncurry replicate) [(1,'H'),(1,'e'),(2,'l'),(1,'o')]"Hello"RseqnO(n). Convert to a list in reverse.-To convert to a list without reversing, use Data.Foldable. .ExamplestoRevList (fromList "!olleH")"Hello!"Sseqn O(\log n)". Look up the element at an index.Exampleslookup 3 (fromList "haskell")Just 'k'lookup (-1) (singleton 7)NothingTseqn O(\log n)). Look up the element at an index. Calls error if the index is out of bounds.Examplesindex 3 (fromList "haskell")'k'index (-1) (singleton 7)*** Exception: ...Useqn O(\log n). Infix version of S.Vseqn O(\log n). Infix version of T. Calls error if the index is out of bounds.Wseqn O(\log n). Update an element at an index. If the index is out of bounds, the sequence is returned unchanged.Examplesupdate 3 'b' (fromList "bird")"birb"update 3 True (singleton False)[False]Xseqn O(\log n). Adjust the element at an index. If the index is out of bounds the sequence is returned unchanged.Examples8adjust Data.List.reverse 1 (fromList ["Hello", "ereht"])["Hello","there"] adjust (*100) (-1) (singleton 7)[7]Yseqn O(\log n). Insert an element at an index. If the index is out of bounds, the element is added to the closest end of the sequence.ExamplesinsertAt 1 'a' (fromList "ct")"cat"#insertAt (-10) 0 (fromList [5,6,7]) [0,5,6,7] insertAt 10 0 (fromList [5,6,7]) [5,6,7,0]Zseqn O(\log n). Delete an element at an index. If the index is out of bounds, the sequence is returned unchanged.ExamplesdeleteAt 2 (fromList "cart")"cat"deleteAt 10 (fromList [5,6,7])[5,6,7][seqn O(\log n)0. Append a value to the beginning of a sequence.Examplescons 1 (fromList [2,3])[1,2,3]\seqn O(\log n)*. Append a value to the end of a sequence.Examplessnoc (fromList [1,2]) 3[1,2,3]]seqn O(\log n)". The head and tail of a sequence.Examplesuncons (fromList [1,2,3])Just (1,[2,3]) uncons emptyNothing^seqn O(\log n)". The init and last of a sequence.Examplesunsnoc (fromList [1,2,3])Just ([1,2],3) unsnoc emptyNothing_seqn O(\log n)=. Take a number of elements from the beginning of a sequence.Examplestake 3 (fromList "haskell")"has"take (-1) (fromList [1,2,3])[]take 10 (fromList [1,2,3])[1,2,3]`seqn O(\log n)=. Drop a number of elements from the beginning of a sequence.Examplesdrop 3 (fromList "haskell")"kell"drop (-1) (fromList [1,2,3])[1,2,3]drop 10 (fromList [1,2,3])[]aseqn O(\log n)7. Take a number of elements from the end of a sequence.bseqn O(\log n)7. Drop a number of elements from the end of a sequence.cseqn O(\log n):. The slice of a sequence between two indices (inclusive).Examples slice (1,3) (fromList "haskell")"ask"$slice (-10,2) (fromList [1,2,3,4,5])[1,2,3]"slice (2,1) (fromList [1,2,3,4,5])[]dseqn O(\log n)$. Split a sequence at a given index. splitAt n xs == (_ n xs, ` n xs)ExamplessplitAt 3 (fromList "haskell")("has","kell")splitAt (-1) (fromList [1,2,3]) ([],[1,2,3])splitAt 10 (fromList [1,2,3]) ([1,2,3],[])eseqn O(\log n)1. Split a sequence at a given index from the end. splitAtEnd n xs == (b n xs, a n xs)fseqn O(n \log n),. All suffixes of a sequence, longest first.Examplestails (fromList [1,2,3])[[1,2,3],[2,3],[3],[]]gseqn O(n \log n)-. All prefixes of a sequence, shortest first.Examplesinits (fromList [1,2,3])[[],[1],[1,2],[1,2,3]]hseqn"O \left(\frac{n}{c} \log c \right)4. Split a sequence into chunks of the given length c. If c <= 0, E is returned.ExampleschunksOf 3 (fromList [1..10])[[1,2,3],[4,5,6],[7,8,9],[10]]chunksOf 10 (fromList "hello") ["hello"]chunksOf (-1) (singleton 7)[]iseqnO(n)). Keep elements that satisfy a predicate.Examplesfilter even (fromList [1..10]) [2,4,6,8,10]jseqnO(n) . Keep the Justs in a sequence.ExamplescatMaybes (fromList [Just 1, Nothing, Nothing, Just 10, Just 100]) [1,10,100]kseqnO(n)$. Map over elements and collect the Justs.lseqnO(n)". Map over elements and split the Lefts and Rights.ExamplesmapEither (\x -> if odd x then Left x else Right x) (fromList [1..10])([1,3,5,7,9],[2,4,6,8,10])mseqnO(n)6. Keep elements that satisfy an applicative predicate.nseqnO(n)). Traverse over elements and collect the Justs.oseqnO(n)'. Traverse over elements and split the Lefts and Rights.pseqn O(i + \log n)<. The longest prefix of elements that satisfy a predicate. i is the length of the prefix.Examples)takeWhile even (fromList [2,4,6,1,3,2,4])[2,4,6]qseqn O(i + \log n). The remainder after removing the longest prefix of elements that satisfy a predicate. i is the length of the prefix.Examples)dropWhile even (fromList [2,4,6,1,3,2,4]) [1,3,2,4]rseqn O(i + \log n). The longest prefix of elements that satisfy a predicate, together with the remainder of the sequence. i is the length of the prefix. span p xs == (p p xs, q p xs)Examples$span even (fromList [2,4,6,1,3,2,4])([2,4,6],[1,3,2,4])sseqn O(i + \log n)&. The longest prefix of elements that do not satisfy a predicate, together with the remainder of the sequence. i is the length of the prefix.  break p == r (not . p)Examples$break odd (fromList [2,4,6,1,3,2,4])([2,4,6],[1,3,2,4])tseqn O(i + \log n)<. The longest suffix of elements that satisfy a predicate. i is the length of the suffix.useqn O(i + \log n). The remainder after removing the longest suffix of elements that satisfy a predicate. i is the length of the suffix.vseqn O(i + \log n). The longest suffix of elements that satisfy a predicate, together with the remainder of the sequence. i is the length of the suffix. spanEnd p xs == (u p xs, t p xs)wseqn O(i + \log n)&. The longest suffix of elements that do not satisfy a predicate, together with the remainder of the sequence. i is the length of the suffix. breakEnd p == v (not . p)xseqnO(n). Reverse a sequence.Examplesreverse (fromList [1,2,3,4,5]) [5,4,3,2,1]yseqnO(n)<. Intersperse an element between the elements of a sequence.Examples"intersperse '.' (fromList "HELLO") "H.E.L.L.O"zseqnO(n). Like  # but keeps all intermediate values.Examplesscanl (+) 0 (fromList [1..5])[0,1,3,6,10,15]{seqnO(n). Like  # but keeps all intermediate values.Examplesscanr (+) 0 (fromList [1..5])[15,14,12,9,5,0]|seqn O(n \log n)&. Sort a sequence. The sort is stable.Examplessort (fromList [4,2,3,5,1]) [1,2,3,4,5]}seqn O(n \log n). Sort a sequence using a comparison function. The sort is stable.Examples!import Data.Ord (Down, comparing).sortBy (comparing Down) (fromList [4,2,3,5,1]) [5,4,3,2,1]~seqnO(n)*. The last element satisfying a predicate.To get the first element, use Data.Foldable. .seqnO(n)8. The index of the first element satisfying a predicate.Examples findIndex even (fromList [1..5])Just 1 findIndex (<0) (fromList [1..5])NothingseqnO(n)7. The index of the last element satisfying a predicate.seqn O(n_1 + n_2). Indices in the second sequence where the first sequence begins as a substring. Includes overlapping occurences.Examples1infixIndices (fromList "ana") (fromList "banana")[1,3].infixIndices (fromList [0]) (fromList [1,2,3])[]+infixIndices (fromList "") (fromList "abc") [0,1,2,3]seqn O(\log n)-. Binary search for an element in a sequence.Given a function f, this function returns an arbitrary element x, if it exists, such that f x = EQ. f2 must be monotonic on the sequence@ specifically fmap f; must result in a sequence which has many (possibly zero) LTs, followed by many EQs, followed by many GTs.Examples3binarySearchFind (`compare` 8) (fromList [2,4..10])Just 83binarySearchFind (`compare` 3) (fromList [2,4..10])NothingseqnO(\min(n_1,n_2))7. Whether the first sequence is a prefix of the second.Examples.fromList "has" `isPrefixOf` fromList "haskell"True.fromList "ask" `isPrefixOf` fromList "haskell"FalseseqnO(\min(n_1,n_2))7. Whether the first sequence is a suffix of the second.Examples.fromList "ell" `isSuffixOf` fromList "haskell"True.fromList "ask" `isSuffixOf` fromList "haskell"Falseseqn O(n_1 + n_2):. Whether the first sequence is a substring of the second.Examples0fromList "meow" `isInfixOf` fromList "homeowner"True+fromList [2,4] `isInfixOf` fromList [2,3,4]Falseseqn O(n_1 + n_2)=. Whether the first sequence is a subsequence of the second.Examples(fromList [2,4] `isSubsequenceOf` [2,3,4]True/fromList "tab" `isSubsequenceOf` fromList "bat"FalseseqnO(\min(n_1,n_2)). Zip two sequences. The result is as long as the shorter sequence.seqnO(\min(n_1,n_2,n_3)). Zip three sequences. The result is as long as the shortest sequence.seqnO(\min(n_1,n_2)). Zip two sequences with a function. The result is as long as the shorter sequence.Examples5zipWith (+) (fromList [1,2,3]) (fromList [1,1,1,1,1])[2,3,4]seqnO(\min(n_1,n_2,n_3)). Zip three sequences with a function. The result is as long as the shortest sequence.seqnO(\min(n_1,n_2)). Zip two sequences with a monadic function. The result is as long as the shorter sequence.seqnO(\min(n_1,n_2,n_3)). Zip three sequences with a monadic function. The result is as long as the shortest sequence.seqnO(n). Unzip a sequence of pairs.seqnO(n). Unzip a sequence of triples.seqnO(n)+. Map over a sequence and unzip the result.Examples.unzipWith (\x -> (x-1, x*2)) (fromList [1..5])([0,1,2,3,4],[2,4,6,8,10])seqnO(n)+. Map over a sequence and unzip the result.seqn liftA2 O(n_1 n_2).(<*)O(n_1 \log n_2).(*>) O(\log n_1).seqn memptyThe empty sequence.seqn (<>)%O(\left| \log n_1 - \log n_2 \right|). Concatenates two sequences.stimes O(\log c).  stimes c xs is xs repeated c times. If c < 0, E is returned.seqn fmapO(n).(<$) O(\log n).seqn lengthO(1). Folds are O(n).seqnLexicographical orderingBDCEFGHIJKLMONPQRSTUVWXYZ[\]^_`cdabefghijklmnopqrstuvwxyz{|}~BDCEFGHIJKLMONPQRSTUVWXYZ[\]^_`cdabefghijklmnopqrstuvwxyz{|}~ Safe-Inferred ;&seqn:Types that have a combinable property, called the measure.seqn!Calculate the measure of a value.//66 Safe-Inferred wseqn!A sequence with elements of type a. An instance of  a" is required for most operations.seqnThe empty sequence.seqnA singleton sequence.seqnO(n) . Create an MSeq from a list.seqnO(n) . Create an MSeq from a reversed list.seqn O(\log n). A sequence with a repeated element. If the length is negative,  is returned.seqnO(n). Generate a sequence from a length and an applicative action. If the length is negative,  is returned.seqnO(n). Generate a sequence from a length and a generator. If the length is negative,  is returned.seqnO(n). Generate a sequence from a length and an applicative generator. If the length is negative,  is returned.seqnO(n)'. Unfold a sequence from left to right.seqnO(n)3. Unfold a sequence monadically from left to right.seqnO(n)'. Unfold a sequence from right to left.seqnO(n)3. Unfold a sequence monadically from right to left.seqnO \left(\sum_i \log n_i \right). Map over a Foldable and concatenate the results.seqnMonadic fixed point. See Control.Monad.Fix.seqnO(n). Convert to a list in reverse.-To convert to a list without reversing, use Data.Foldable. .seqn O(\log n)". Look up the element at an index.seqn O(\log n)). Look up the element at an index. Calls error if the index is out of bounds.seqn O(\log n). Infix version of .seqn O(\log n). Infix version of . Calls error if the index is out of bounds.seqn O(\log n). Update an element at an index. If the index is out of bounds, the sequence is returned unchanged.seqn O(\log n). Adjust the element at an index. If the index is out of bounds, the sequence is returned unchanged.seqn O(\log n). Insert an element at an index. If the index is out of bounds, the element is added to the closest end of the sequence.seqn O(\log n). Delete an element at an index. If the index is out of bounds, the sequence is returned unchanged.seqn O(\log n)0. Append a value to the beginning of a sequence.seqn O(\log n)*. Append a value to the end of a sequence.seqn O(\log n)". The head and tail of a sequence.seqn O(\log n)". The init and last of a sequence.seqn O(\log n)=. Take a number of elements from the beginning of a sequence.seqn O(\log n)=. Drop a number of elements from the beginning of a sequence.seqn O(\log n):. The slice of a sequence between two indices (inclusive).seqn O(\log n)7. Take a number of elements from the end of a sequence.seqn O(\log n)7. Drop a number of elements from the end of a sequence.seqn O(\log n)$. Split a sequence at a given index. splitAt n xs == ( n xs,  n xs)seqn O(\log n)1. Split a sequence at a given index from the end. splitAtEnd n xs == ( n xs,  n xs)seqnO(n)). Keep elements that satisfy a predicate.seqnO(n)$. Map over elements and collect the Justs.seqnO(n)". Map over elements and split the Lefts and Rights.seqnO(n)6. Keep elements that satisfy an applicative predicate.seqnO(n)). Traverse over elements and collect the Justs.seqnO(n)'. Traverse over elements and split the Lefts and Rights.seqn O(i + \log n)<. The longest prefix of elements that satisfy a predicate. i is the length of the prefix.seqn O(i + \log n). The remainder after removing the longest prefix of elements that satisfy a predicate. i is the length of the prefix.seqn O(i + \log n). The longest prefix of elements that satisfy a predicate, together with the remainder of the sequence. i is the length of the prefix. span p xs == ( p xs,  p xs)seqn O(i + \log n)&. The longest prefix of elements that do not satisfy a predicate, together with the remainder of the sequence. i is the length of the prefix.  break p ==  (not . p)seqn O(i + \log n)<. The longest suffix of elements that satisfy a predicate. i is the length of the suffix.seqn O(i + \log n). The remainder after removing the longest suffix of elements that satisfy a predicate. i is the length of the suffix.seqn O(i + \log n). The longest suffix of elements that satisfy a predicate, together with the remainder of the sequence. i is the length of the suffix. spanEnd p xs == ( p xs,  p xs)seqn O(i + \log n)&. The longest suffix of elements that do not satisfy a predicate, together with the remainder of the sequence. i is the length of the suffix. breakEnd p ==  (not . p)seqnO(n). Map over a sequence.seqn O(n_1 n_2)%. Cartesian product of two sequences.seqnO(n). Traverse a sequence.seqnO(n)!. Map over a sequence with index.seqnO(n)!. Traverse a sequence with index.seqnO(n). Reverse a sequence.seqnO(n)<. Intersperse an element between the elements of a sequence.seqnO(n). Like  # but keeps all intermediate values.seqnO(n). Like  # but keeps all intermediate values.seqn O(n \log n). Sort a sequence.seqn O(n \log n).. Sort a sequence using a comparison function.seqnO(n)*. The last element satisfying a predicate.To get the first element, use Data.Foldable. .seqnO(n)8. The index of the first element satisfying a predicate.seqnO(n)7. The index of the last element satisfying a predicate.seqn O(n_1 + n_2). Indices in the second sequence where the first sequence begins as a substring. Includes overlapping occurences.seqn O(\log n)-. Binary search for an element in a sequence.Given a function f, this function returns an arbitrary element x, if it exists, such that f x = EQ. f2 must be monotonic on the sequence@ specifically fmap f; must result in a sequence which has many (possibly zero) LTs, followed by many EQs, followed by many GTs.seqnO(\min(n_1,n_2))7. Whether the first sequence is a prefix of the second.seqnO(\min(n_1,n_2))7. Whether the first sequence is a suffix of the second.seqn O(n_1 + n_2):. Whether the first sequence is a substring of the second.seqn O(n_1 + n_2)<. Whether the first sequence is a subsequence of the second.seqnO(\min(n_1,n_2)). Zip two sequences with a function. The result is as long as the shorter sequence.seqnO(\min(n_1,n_2,n_3)). Zip three sequences with a function. The result is as long as the shortest sequence.seqnO(\min(n_1,n_2)),. Zip two sequences with a monadic function.seqnO(\min(n_1,n_2,n_3)).. Zip three sequences with a monadic function.seqnO(n)+. Map over a sequence and unzip the result.seqnO(n)+. Map over a sequence and unzip the result.seqnO(1). The summary is the fold of measures of all elements in the sequence. Returns Nothing if the sequence is empty. summaryMay ==  (Just . )seqnO(1). The summary is the fold of measures of all elements in the sequence.  summary ==  seqn O(\log n). The summary of a slice of the sequence. The slice is indicated by its bounds (inclusive). sliceSummaryMay lu ==  .  luseqn O(\log n). The summary of a slice of the sequence. The slice is indicated by its bounds (inclusive). sliceSummary lu ==  .  luseqnStrict left fold over measures covering a slice. These measures are summaries of  O(\log n) adjacent slices which form the requested slice when concatenated. +foldlSliceSummaryComponents (<>) mempty == This function is useful when3Some property of the summary of a slice is desired.-It is expensive to compute the summary, i.e. (<>) for  Measure a is expensive.It is possible, and cheaper, to compute the property given components of the summary of the slice.ExamplesOne use case for this is order statistic queries on a slice, such as counting the number of elements less than some value.It requires a Multiset structure as outlined below, which can be implemented using sorted arrays/balanced binary trees. data Multiset a singleton :: Ord a => a -> MultiSet a -- O(1) (<>) :: Ord a => Multiset a -> Multiset a -> Multiset a -- O(n1 + n2) countLessThan :: Ord a => a -> Multiset a -> Int -- O(log n) import Data.Seqn.MSeq (Measured, MSeq) import qualified Data.Seqn.MSeq as MSeq newtype Elem a = Elem a deriving Show instance Ord a => Measured (Elem a) where type Measure (Elem a) = Multiset a measure (Elem x) = singleton x -- | O(n log n). fromList :: Ord a => [a] -> MSeq (Elem a) fromList = MSeq.fromList . map Elem -- | O(log^2 n). countLessThanInSlice :: Ord a => a -> (Int, Int) -> MSeq (Elem a) -> Int countLessThanInSlice k = MSeq.foldlSliceSummaryComponents (\acc xs -> acc + countLessThan k xs) 0 seqn O(\log n). Perform a binary search on the summaries of the non-empty prefixes of the sequence.binarySearchPrefix p xs for a monotonic predicate p returns two adjacent indices i and j, 0 <= i < j < length xs.i$ is the greatest index such that )p (fromJust (summaryMay (take (i+1) xs))) is False, or Nothing if there is no such index.j! is the least index such that )p (fromJust (summaryMay (take (j+1) xs))) is True, or Nothing if there is no such index.Examples import  Data.Monoid (Sum(..)) newtype Elem = E Int deriving Show instance Measured Elem where type Measure Elem = Sum Int measure (E x) = Sum x &let xs = fromList [E 1, E 2, E 3, E 4]!The summaries of the prefixes of xs by index are:0: measure (E 1) = Sum 1.)1: measure (E 1) <> measure (E 2) = Sum 3.:2: measure (E 1) <> measure (E 2) <> measure (E 3) = Sum 6.3: measure (E 1) <> measure (E 2) <> measure (E 3) <> measure (E 4) = Sum 10.binarySearchPrefix (> Sum 4) xs(Just 1,Just 2)  JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ index: J 0 J 1 J 2 J 3 J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ prefix summary: J Sum 1 J Sum 3 J Sum 6 | Sum 10 J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ (> Sum 4): J False J False J True J True J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ result: ( Just 1 , Just 2 )  binarySearchPrefix (> Sum 20) xs(Just 3,Nothing)  JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ index: J 0 J 1 J 2 J 3 J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ prefix summary: J Sum 1 J Sum 3 J Sum 6 | Sum 10 J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ (> Sum 20): J False J False J False J False J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ result: ( Just 3 , Nothing ) seqn O(\log n). Perform a binary search on the summaries of the non-empty suffixes of the sequence.binarySearchSuffix p xs for a monotonic predicate p returns two adjacent indices i and j, 0 <= i < j < length xs.i$ is the greatest index such that %p (fromJust (summaryMay (drop i xs))) is True, or Nothing if there is no such index.j! is the least index such that %p (fromJust (summaryMay (drop j xs))) is False, or Nothing if there is no such indexExamples import  Data.Monoid (Sum(..)) newtype Elem = E Int deriving Show instance Measured Elem where type Measure Elem = Sum Int measure (E x) = Sum x &let xs = fromList [E 1, E 2, E 3, E 4]!The summaries of the suffixes of xs by index are:0: measure (E 1) <> measure (E 2) <> measure (E 3) <> measure (E 4) = Sum 10.:1: measure (E 2) <> measure (E 3) <> measure (E 4) = Sum 9.)2: measure (E 3) <> measure (E 4) = Sum 7.3: measure (E 4) = Sum 4.binarySearchSuffix (> Sum 4) xs(Just 2,Just 3)  JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ index: J 0 J 1 J 2 J 3 J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ suffix summary: J Sum 10 J Sum 9 J Sum 7 | Sum 4 J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ (> Sum 4): J True J True J True J False J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ result: ( Just 2 , Just 3 )  binarySearchSuffix (> Sum 20) xs(Nothing,Just 0)  JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ index: J 0 J 1 J 2 J 3 J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ suffix summary: J Sum 10 J Sum 9 J Sum 7 | Sum 4 J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ (> Sum 20): J False J False J False J False J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ result: ( Nothing , Just 0 ) seqnReduce a sequence to normal form, given functions to reduce its contents.seqn memptyThe empty sequence.seqn (<>)%O(\left| \log n_1 - \log n_2 \right|). Concatenates two sequences.stimes O(\log c).  stimes c xs is xs repeating c times. If c < 0,  is returned.seqn lengthO(1). Folds are O(n).seqnLexicographical ordering Safe-Inferredx  Safe-Inferred 9seqn&A priority associated with a value. A PQueue (Entry k a); may be used when the priority is separate from the value.seqnA minimum priority queue.PQueue can be used as a maximum priority queue by wrapping its elements with .seqnThe empty queue.seqnA singleton queue.seqnO(n). Create a queue from a list.seqnO \left(\sum_i \log n_i \right). Map over a Foldable and concatenate the results.seqn O(\log n)#. Insert an element into the queue.Note: When inserting multiple elements, it is more efficient to concatenate a fresh queue rather than repeatedly insert elements. q <> fromList xs -- Good foldl' (flip insert) q xs -- Worse seqnO(1)#. The minimum element in the queue.seqn O(\log n). The minimum element in the queue, with the rest of the queue.seqn O(n \log n). Convert to a sorted list.seqn The priority.seqn The value.seqnFolds in insertion order.seqn lengthO(1).Folds in insertion order.seqn Compares by k only.seqn Compares by k only.seqnInsertion order.seqn-Lexicographical ordering, in insertion order.seqn (<>)%O(\left| \log n_1 - \log n_2 \right|). Concatenate two PQueues.seqn memptyThe empty queue. Safe-Inferred   Safe-InferredeBEFGHIJKLMONPQRSTUVWXYZ[\]^_`cdabefghijklmnopqrstuvwxyz{|}~BEFGHIJKLMONPQRSTUVWXYZ[\]^_`cdabefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP.QRSTUVWX9YZ[\]^_`abcd;<=>?@efghijklmnopqrsBCtuvwxyz{|}~LMS123456789`:;<=>?@ABCDEFGHIJKLMRSTUVWX9YZ[\]^_`abcd;<=>?@efighjkoqrsBCtuvwxyz{78|}~LM         R S T ]                                                  #seqn-0.1.1.0-4mpflnO1ZrXDpcrnJPyAygData.Seqn.Internal.UtilData.Seqn.Internal.Tree Data.Seqn.SeqData.Seqn.Internal.SeqData.Seqn.Internal.MTreeData.Seqn.MSeqData.Seqn.Internal.MSeqData.Seqn.PQueueData.Seqn.Internal.PQueueseqnData.Seqn.Internal.KMPData.Seqn.Internal.Stream Data.FoldabletoListfoldl'foldr'findData.OrdDownSStateSStateT runSStateTTaggedunTaggedSMaybeSNothingSJustS3S2 BiapplicativebipurebiliftA2 evalSStateTsState evalSState#.$fBiapplicativeConst$fBiapplicativeS2 $fBifunctorS2 $fFunctorS2$fBiapplicativeTagged$fBifunctorTagged$fFunctorTagged$fApplicativeSStateT$fFunctorSStateTTreeBinTipsizebinifoldl'ifoldr'fold foldSimpletraverse itraverse generateAadjustFinsertAtdeleteAtconssnocunconsunsnocsplitAtF mapMaybeA mapEitherAzipWithStreamM unzipWithA unzipWith3AlinkmergegluebalanceLbalanceRvaliddebugShowsPrec $fNFData1Tree $fNFDataTreeSeqEmptyempty singletonfromList fromRevList replicate replicateAgenerateunfoldrunfoldrMunfoldlunfoldlM concatMap toRevListlookupindex!?!updateadjusttakedroptakeEnddropEndslicesplitAt splitAtEndtailsinitschunksOffilter catMaybesmapMaybe mapEitherfilterA takeWhile dropWhilespanbreak takeWhileEnd dropWhileEndspanEndbreakEndreverse interspersescanlscanrsortsortByfindEnd findIndex findIndexEnd infixIndicesbinarySearchFind isPrefixOf isSuffixOf isInfixOfisSubsequenceOfzipzip3zipWithzipWith3zipWithM zipWith3Munzipunzip3 unzipWith unzipWith3fromTree$fTraversableWithIndexIntSeq$fFoldableWithIndexIntSeq$fFunctorWithIndexIntSeq $fIsListSeq $fIsStringSeq $fMonadZipSeq $fMonadFixSeq$fMonadFailSeq$fMonadPlusSeq $fMonadSeq$fAlternativeSeq$fApplicativeSeq $fNFData1Seq $fNFDataSeq $fMonoidSeq$fSemigroupSeq$fTraversableSeq $fFunctorSeq $fFoldableSeq $fRead1Seq $fShow1Seq $fOrd1Seq$fEq1Seq $fReadSeq $fShowSeq$fOrdSeq$fEqSeqMTreeMBinMTipMeasuredMeasuremeasureliftRnf2<>><<>binnfoldMapifoldMap unconsSure unsnocSure $fNFDataMTreeMSeqMEmptymfixmapliftA2imap summaryMaysummarysliceSummaryMay sliceSummaryfoldlSliceSummaryComponentsbinarySearchPrefixbinarySearchSuffix fromMTree $fNFDataMSeq $fMonoidMSeq$fSemigroupMSeq$fFoldableWithIndexIntMSeq $fIsListMSeq$fFoldableMSeq $fShow1MSeq $fOrd1MSeq $fEq1MSeq $fReadMSeq $fShowMSeq $fOrdMSeq$fEqMSeqEntryPQueueElemMininsertminminView toSortedList entryPrio entryValue $fNFData1Min $fNFDataMin$fSemigroupMin$fMeasuredElem$fNFData1PQueue$fNFDataPQueue$fIsListPQueue$fFoldableWithIndexIntPQueue$fFoldablePQueue $fShow1PQueue $fOrd1PQueue $fEq1PQueue $fNFDataEntry $fOrdEntry $fEqEntry $fShowEntry $fReadEntry$fFunctorEntry $fEqPQueue $fOrdPQueue$fSemigroupPQueue$fMonoidPQueue $fShowPQueue $fReadPQueue$fEqElem $fOrdElem $fShowElem $fReadElem $fNFDataElemTableStatebuildstepStepYieldDoneStreamfoldrifoldrbase