Îõ³h*>Œ<ÍÕ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST0.2.5+(c) Brent Yorgey, Louis Wasserman 2008-2012BSD-style (see LICENSE) Brent Yorgey stable Haskell 2010 Safe-Inferred;DÁ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.FsplitF 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, F n l, returns an infinite list of empty lists.chunksOf 3 [1..12]$[[1,2,3],[4,5,6],[7,8,9],[10,11,12]]chunksOf 3 "Hello there"["Hel","lo ","the","re"]chunksOf 3 ([] :: [Int])[] Note that F n [] is [], not [[]]:. This is intentional, and satisfies the property that 7chunksOf n xs ++ chunksOf n ys == chunksOf n (xs ++ ys) whenever n evenly divides the length of xs.Isplit.Split a list into chunks of the given lengths.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.Jsplit9Split a list into chunks of the given lengths. Unlike IÈ, 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.!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 I.Ksplitˆ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 (break isSpace . dropWhile isSpace)Lsplit>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..15]+[[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15]]divvy 5 2 [1..15]Ô[[1,2,3,4,5],[3,4,5,6,7],[5,6,7,8,9],[7,8,9,10,11],[9,10,11,12,13],[11,12,13,14,15]]ý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 = map average . divvy 20 1Í    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLÍ     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL+(c) Brent Yorgey, Louis Wasserman 2008-2012BSD-style (see LICENSE) Brent Yorgey stable Haskell 2010 Safe-Inferred<€$<;=@ACDFIJKL*+,-./0123456789:>?BHG$<;=@ACDFIJKL*+,-./0123456789:>?BHGÙ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\][\^[_`[abã"split-0.2.5-1l4CkS8xOq3IoZdtAGdz5rData.List.Split.Internalssplit 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 dropFinaloneOf onSublistwhenElt dropDelims keepDelimsL keepDelimsRcondense dropInitBlankdropFinalBlankdropInnerBlanks mapSplitter dropBlanks startsWithstartsWithOneOfendsWith endsWithOneOf splitOneOfsplitOn splitWhensepBy sepByOneOfendBy endByOneOf unintercalatewordsBylinesBybuildchunksOfchunk splitEvery splitPlacessplitPlacesBlankschopdivvy $fShowChunk $fEqChunk $fEqEndPolicy$fShowEndPolicy$fEqCondensePolicy$fShowCondensePolicy$fEqDelimPolicy$fShowDelimPolicybase Data.Foldableconcat concatMapGHC.Basemap Data.OldListlines