Îõ³h$<Æ; Ô      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS+(c) Brent Yorgey, Louis Wasserman 2008-2012BSD-style (see LICENSE) Brent Yorgey stable Haskell 2010 Safe-Inferred9‡ÀsplitäInternal representation of a split list that tracks which pieces are delimiters and which aren't.split!Tag chunks as delimiters or text.split b -> b) -> b -> b) -> [a]but since we only use it when  (b ~ [a])ì, we give it the more restricted type signature in order to avoid needing a non-Haskell2010 extension.ÈNote that the 0.1.4.3 release of this package did away with a custom build2 implementation in favor of importing one from GHC.Exts‹, which was (reportedly) faster for some applications. However, in the interest of simplicity and complete Haskell2010 compliance as splitØ is being included in the Haskel Platform, version 0.2.1.0 has gone back to defining build$ manually. This is in line with split;'s design philosophy of having efficiency as a non-goal.EsplitE nË splits a list into length-n pieces. The last piece will be shorter if n7 does not evenly divide the length of the list. If n <= 0, E n l: returns an infinite list of empty lists. For example: Note that E n [] is [], not [[]]Ï. This is intentional, and is consistent with a recursive definition of E ; it satisfies the property that 7chunksOf n xs ++ chunksOf n ys == chunksOf n (xs ++ ys) whenever n evenly divides the length of xs.Hsplit;Split a list into chunks of the given lengths. For example: ªsplitPlaces [2,3,4] [1..20] == [[1,2],[3,4,5],[6,7,8,9]] splitPlaces [4,9] [1..10] == [[1,2,3,4],[5,6,7,8,9,10]] splitPlaces [4,9,3] [1..10] == [[1,2,3,4],[5,6,7,8,9,10]]œIf the input list is longer than the total of the given lengths, then the remaining elements are dropped. If the list is shorter than the total of the given lengths, then the result may contain fewer chunks than requested, and the last chunk may be shorter than requested.Isplit9Split a list into chunks of the given lengths. Unlike HÕ, the output list will always be the same length as the first input argument. If the input list is longer than the total of the given lengths, then the remaining elements are dropped. If the list is shorter than the total of the given lengths, then the last several chunks will be shorter than requested or empty. For example: ¿splitPlacesBlanks [2,3,4] [1..20] == [[1,2],[3,4,5],[6,7,8,9]] splitPlacesBlanks [4,9] [1..10] == [[1,2,3,4],[5,6,7,8,9,10]] splitPlacesBlanks [4,9,3] [1..10] == [[1,2,3,4],[5,6,7,8,9,10],[]]àNotice the empty list in the output of the third example, which differs from the behavior of H.JsplitˆA useful recursion pattern for processing a list to produce a new list, often used for "chopping" up the input list. Typically chop is called with some function that will consume an initial prefix of the list and produce a value and the rest of the list.ÍFor example, many common Prelude functions can be implemented in terms of chop: µgroup :: (Eq a) => [a] -> [[a]] group = chop (\ xs@(x:_) -> span (==x) xs) words :: String -> [String] words = filter (not . null) . chop (span (not . isSpace) . dropWhile isSpace)Ksplit>Divides up an input list into a set of sublists, according to n and m= input specifications you provide. Each sublist will have n; items, and the start of each sublist will be offset by m items from the previous one. Ñdivvy 5 5 [1..20] == [[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15],[16,17,18,19,20]]ýIn the case where a source list's trailing elements do no fill an entire sublist, those trailing elements will be dropped. :divvy 5 2 [1..10] == [[1,2,3,4,5],[3,4,5,6,7],[5,6,7,8,9]]ÇAs an example, you can generate a moving average over a list of prices: ›type Prices = [Float] type AveragePrices = [Float] average :: [Float] -> Float average xs = sum xs / (fromIntegral $ length xs) simpleMovingAverage :: Prices -> AveragePrices simpleMovingAverage priceList = map average divvyedPrices where divvyedPrices = divvy 20 1 priceListÌ    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKÌ     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK+(c) Brent Yorgey, Louis Wasserman 2008-2012BSD-style (see LICENSE) Brent Yorgey stable Haskell 2010 Safe-Inferred:Á#*+,-./0123456789:;<=>?@ABCEFGHIJK#;:AGFØ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\Z[]Z^_Z`aâ$split-0.2.3.5-ANOfSOUpDOyHHL7Cwz4FrwData.List.Split.Internals Data.List intercalatewords Data.CharisSpaceData.List.Split SplitListChunkDelimText EndPolicy DropBlank KeepBlankCondensePolicyCondenseDropBlankFieldsKeepBlankFields DelimPolicyDropKeepKeepLeft KeepRight DelimiterSplitter delimiter delimPolicycondensePolicyinitBlankPolicyfinalBlankPolicydefaultSplitter matchDelimfromElemisDelimisText splitInternal breakDelim postProcessdoDrop doCondense insertBlanks insertBlanks'doMerge mergeLeft mergeRight dropInitial dropFinalsplitoneOf onSublistwhenElt dropDelims keepDelimsL keepDelimsRcondense dropInitBlankdropFinalBlankdropInnerBlanks dropBlanks startsWithstartsWithOneOfendsWith endsWithOneOf splitOneOfsplitOn splitWhensepBy sepByOneOfendBy endByOneOf unintercalatewordsBylinesBybuildchunksOfchunk splitEvery splitPlacessplitPlacesBlankschopdivvy $fShowChunk $fEqChunk $fEqEndPolicy$fShowEndPolicy$fEqCondensePolicy$fShowCondensePolicy$fEqDelimPolicy$fShowDelimPolicybase Data.Foldableconcat concatMapGHC.Basemap Data.OldListlines