h*b@\9      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1.4.18  Safe-Inferredfoldl A strict foldl A strict foldlConvert  to foldlConvert  to foldlConvert  to   Safe-Inferred]  Safe-Inferred  Safe-Inferredfoldl4fromReverseListN 3 [1,2,3] :: Data.Vector.Vector Int[3,2,1] Trustworthy4foldl$A Handler for the upstream input of  3Any lens, traversal, or prism will type-check as a  foldl instance Monad m => Monoid (EndoM m a) where mempty = EndoM return mappend (EndoM f) (EndoM g) = EndoM (f <=< g) foldl&A handler for the upstream input of a 3Any lens, traversal, or prism will type-check as a  foldlLike , but monadic.A ' # m a b' processes elements of type a, and results in a monadic value of type m b.foldlFoldM   step   initial   extractfoldlEfficient representation of a left fold that preserves the fold's step function, initial accumulator, and extraction functionThis allows the  instance to assemble derived folds that traverse the container only onceA '! a b' processes elements of type a$ and results in a value of type b.foldlFold   step   initial   extractfoldlApply a strict left  to a  containerfoldlLike  , but monadicfoldlConvert a strict left  into a scanFoldl.scan Foldl.length [1..5] [0,1,2,3,4,5]foldl Convert a  into a prescan for any  type"Prescan" means that the last element of the scan is not included!Foldl.prescan Foldl.length [1..5] [0,1,2,3,4]foldl Convert a  into a postscan for any  type"Postscan" means that the first element of the scan is not included"Foldl.postscan Foldl.length [1..5] [1,2,3,4,5]foldl)Fold all values within a container using  and foldl Convert a "foldMap" to a foldl/Get the first element of a container or return  if the container is emptyfoldl.Get the last element of a container or return  if the container is emptyfoldlGet the last element of a container or return a default value if the container is emptyfoldlReturn the last N elementsfoldlReturns  if the container is empty,  otherwisefoldl"Return the length of the containerfoldlReturns  if all elements are ,  otherwisefoldlReturns  if any element is ,  otherwise foldl(all predicate) returns , if all elements satisfy the predicate,  otherwise!foldl(any predicate) returns - if any element satisfies the predicate,  otherwise"foldl Computes the sum of all elements#foldl$Computes the product of all elements$foldl g) = sink f <> sink g -- if `(<>)` is commutative sink mempty = mempty6foldlLike , except with a more general  return value7foldlLike ., except with a more general  argument8foldlFold all values into a list9foldl-Fold all values into a list, in reverse order:foldl O(n log n). Fold values into a list with duplicates removed, while preserving their first occurrences;foldlO(n^2). Fold values into a list with duplicates removed, while preserving their first occurrences<foldlFold values into a set=foldlFold values into a hash-set>foldlFold pairs into a map.?foldlGiven a  , produces a ! which applies that fold to each a separated by key k.fold (foldByKeyMap Control.Foldl.sum) [("a",1), ("b",2), ("b",20), ("a",10)]fromList [("a",11),("b",22)]@foldlFold pairs into a hash-map.AfoldlGiven a  , produces a ! which applies that fold to each a separated by key k.List.sort (HashMap.toList (fold (foldByKeyHashMap Control.Foldl.sum) [("a",1), ("b",2), ("b",20), ("a",10)]))[("a",11),("b",22)]BfoldlFold all values into a vectorCfoldlFold all values into a vectorThis is more efficient than B but is impureDfoldlUpgrade a fold to accept the  typeEfoldl.Upgrade a more traditional fold to accept the  typeFfoldl%Upgrade a monadic fold to accept the   typeGfoldl6Upgrade a more traditional monadic fold to accept the   typeHfoldl Generalize a  to a  generalize (pure r) = pure r generalize (f <*> x) = generalize f <*> generalize xIfoldlSimplify a pure   to a  simplify (pure r) = pure r simplify (f <*> x) = simplify f <*> simplify xJfoldlShift a  3 from one monad to another with a morphism such as lift or liftIO!; the effect is the same as  .KfoldlLift a monadic value to a  ; works like  . lifts . pure = pureLfoldlAllows to continue feeding a  4 even after passing it to a function that closes it. For pure s, this is provided by the  instance.Mfoldl _Fold1 step returns a new  using just a step function that has the same type for the accumulator and the element. The result type is the accumulator type wrapped in 0. The initial accumulator is retrieved from the , the result is None for empty containers.Nfoldl(premap f folder) returns a new  where f is applied at each step ;fold (premap f folder) list = fold folder (List.map f list)'fold (premap Sum Foldl.mconcat) [1..10]Sum {getSum = 55})fold Foldl.mconcat (List.map Sum [1..10])Sum {getSum = 55} 4premap id = id premap (f . g) = premap g . premap f premap k (pure r) = pure r premap k (f <*> x) = premap k f <*> premap k xOfoldl(premapM f folder) returns a new  - where f is applied to each input element  x) = premapM k f <*> premapM k xPfoldl(postmapM f folder) returns a new  ' where f is applied to the final value. postmapM pure = id postmapM (f >=> g) = postmapM g . postmapM f !postmapM k (pure r) = lifts (k r)Qfoldl(prefilter f folder) returns a new  where the folder's input is used only when the input satisfies a predicate fThis can also be done with V (handles (filtered f)) but  prefilter1 does not need you to depend on a lens library. 5) Control.Foldl.sum) [1..10]40,fold Control.Foldl.sum (filter (>5) [1..10])40Rfoldl(prefilterM f folder) returns a new   where the folder's input is used only when the input satisfies a monadic predicate f.Sfoldl Transforms a  into one which ignores elements until they stop satisfying a predicate fold (predropWhile p folder) list = fold folder (dropWhile p list)5fold (predropWhile (>5) Control.Foldl.sum) [10,9,5,9]14Tfoldl(drop n folder) returns a new  that ignores the first n< inputs but otherwise behaves the same as the original fold. fold (drop n folder) list = fold folder (Data.List.genericDrop n list)9Foldl.fold (Foldl.drop 3 Foldl.sum) [10, 20, 30, 1, 2, 3]6:Foldl.fold (Foldl.drop 10 Foldl.sum) [10, 20, 30, 1, 2, 3]0Ufoldl(dropM n folder) returns a new   that ignores the first n< inputs but otherwise behaves the same as the original fold. foldM (dropM n folder) list = foldM folder (Data.List.genericDrop n list)Foldl.foldM (Foldl.dropM 3 (Foldl.generalize Foldl.sum)) [10, 20, 30, 1, 2, 3]6Foldl.foldM (Foldl.dropM 10 (Foldl.generalize Foldl.sum)) [10, 20, 30, 1, 2, 3]0Vfoldl(handles t folder) transforms the input of a ' using a lens, traversal, or prism: handles _1 :: Fold a r -> Fold (a, b) r handles _Left :: Fold a r -> Fold (Either a b) r handles traverse :: Traversable t => Fold a r -> Fold (t a) r handles folded :: Foldable t => Fold a r -> Fold (t a) r,fold (handles traverse sum) [[1..5],[6..10]]55fold (handles (traverse . traverse) sum) [[Nothing, Just 2, Just 7],[Just 13, Nothing, Just 20]]42*fold (handles (filtered even) sum) [1..10]30fold (handles _2 Foldl.mconcat) [(1,"Hello "),(2,"World"),(3,"!")]"Hello World!" 8handles id = id handles (f . g) = handles f . handles g handles t (pure r) = pure r handles t (f <*> x) = handles t f <*> handles t xWfoldl(foldOver f folder xs) folds all values from a Lens, Traversal, Prism or Fold with the given folder/foldOver (_Just . both) Foldl.sum (Just (2, 3))5)foldOver (_Just . both) Foldl.sum Nothing0 8Foldl.foldOver f folder xs == Foldl.fold folder (xs^..f) Foldl.foldOver (folded . f) folder == Foldl.fold (handles f folder) #Foldl.foldOver folded == Foldl.foldXfoldl(handlesM t folder) transforms the input of a  ' using a lens, traversal, or prism: handlesM _1 :: FoldM m a r -> FoldM (a, b) r handlesM _Left :: FoldM m a r -> FoldM (Either a b) r handlesM traverse :: Traversable t => FoldM m a r -> FoldM m (t a) r handlesM folded :: Foldable t => FoldM m a r -> FoldM m (t a) rX obeys these laws:  x) = handlesM t f <*> handlesM t xYfoldl(foldOverM f folder xs) folds all values from a Lens, Traversal, Prism or Fold monadically with the given folder Foldl.foldOverM (folded . f) folder == Foldl.foldM (handlesM f folder) %Foldl.foldOverM folded == Foldl.foldMZfoldl folded :: Foldable t => Fold (t a) a handles folded :: Foldable t => Fold a r -> Fold (t a) r[foldl*fold (handles (filtered even) sum) [1..10]30?@ABCDEFGHIKJLMNOPQRSTU VW XYZ[\]^_  !"#$%&'()*+,-.1/023456789:;<=>?@ABCDEFGHIKJLMNOPQRSTU VW XYZ[\]^_ Safe-Inferred<3zfoldlApply a strict left  to lazy text{foldlApply a strict monadic left   to lazy text|foldl3Get the first character of a text stream or return  if the stream is empty}foldl2Get the last character of a text stream or return  if the text stream is empty~foldlReturns  if the text stream is empty,  otherwisefoldl2Return the length of the text stream in charactersfoldl(all predicate) returns . if all characters satisfy the predicate,  otherwisefoldl(any predicate) returns / if any character satisfies the predicate,  otherwisefoldlComputes the maximum characterfoldlComputes the minimum characterfoldl(elem c) returns - if the text stream has a character equal to c,  otherwisefoldl (notElem c) returns 1 if the text stream has a character equal to c,  otherwisefoldl(find predicate) returns the first character that satisfies the predicate or ( if no character satisfies the predicatefoldl (index n) returns the n$th character of the text stream, or ; if the stream has an insufficient number of charactersfoldl (elemIndex c)6 returns the index of the first character that equals c , or  if no character matchesfoldl(findIndex predicate) returns the index of the first character that satisfies the predicate, or , if no character satisfies the predicatefoldl (count c) returns the number of times c appearsfoldlCombine all the strict  chunks to build a lazy z{|}~ z{|}~  Safe-Inferred(JKfoldl&A handler for the upstream input of a This is compatible with van Laarhoven optics as defined in the lens package. Any lens, fold1 or traversal1 will type-check as a .foldl instance Monad m => Semigroup (FromMaybe m a) where mappend (FromMaybe f) (FromMaybe g) = FromMaybeM (f . Just . g)foldlA  is like a 7 except that it consumes at least one input elementfoldlFold1_ is an alternative to the Fold1 constructor if you need to explicitly work with an initial, step and extraction function.Fold1_ is similar to the Fold constructor, which also works with an initial, step and extraction function. However, note that Fold takes the step function as the first argument and the initial accumulator as the second argument, whereas Fold1_ takes them in swapped order:Fold1_   initial   step   extractWhile Fold resembles , Fold1_ resembles .foldlApply a strict left  to a  listfoldl Promote any  to an equivalent foldl Promote any  to an equivalent foldl4Fold all values within a non-empty container into a  listfoldl4Fold all values within a non-empty container using ()foldl.Get the first element of a non-empty containerfoldl-Get the last element of a non-empty containerfoldlComputes the maximum elementfoldlComputes the maximum element with respect to the given comparison functionfoldlComputes the minimum elementfoldlComputes the minimum element with respect to the given comparison functionfoldlUpgrade a fold to accept the  typefoldl.Upgrade a more traditional fold to accept the  typefoldl(premap f folder) returns a new  where f is applied at each step Foldl1.fold1 (premap f folder) list = Foldl1.fold1 folder (NonEmpty.map f list)7Foldl1.fold1 (premap Sum Foldl1.sconcat) (1 :| [2..10])Sum {getSum = 55}=Foldl1.fold1 Foldl1.sconcat $ NonEmpty.map Sum (1 :| [2..10])Sum {getSum = 55} 4premap id = id premap (f . g) = premap g . premap f premap k (pure r) = pure r premap k (f <*> x) = premap k f <*> premap k xfoldl(handles t folder) transforms the input of a . using a Lens, Traversal1, or Fold1 optic: handles _1 :: Fold1 a r -> Fold1 (a, b) r handles traverse1 :: Traversable1 t => Fold1 a r -> Fold1 (t a) r handles folded1 :: Foldable1 t => Fold1 a r -> Fold1 (t a) rFoldl1.fold1 (handles traverse1 Foldl1.nonEmpty) $ (1 :| [2..4]) :| [ 5 :| [6,7], 8 :| [9,10] ]1 :| [2,3,4,5,6,7,8,9,10]Foldl1.fold1 (handles _2 Foldl1.sconcat) $ (1,"Hello ") :| [(2,"World"),(3,"!")]"Hello World!" 8handles id = id handles (f . g) = handles f . handles g handles t (pure r) = pure r handles t (f <*> x) = handles t f <*> handles t xfoldl(foldOver f folder xs) folds all values from a Lens, Traversal1 or Fold1 optic with the given folder1foldOver (_2 . both1) Foldl1.nonEmpty (1, (2, 3))2 :| [3] =Foldl1.foldOver f folder xs == Foldl1.fold1 folder (xs ^.. f) Foldl1.foldOver (folded1 . f) folder == Foldl1.fold1 (Foldl1.handles f folder) 'Foldl1.foldOver folded1 == Foldl1.fold1foldl  Fold1 a r -> Fold1 (t a) rfoldlNest a fold in an Apply. Safe-InferredQkfoldlApply a strict left  to a lazy bytestringfoldlApply a strict monadic left   to a lazy bytestringfoldl.Get the first byte of a byte stream or return  if the stream is emptyfoldl-Get the last byte of a byte stream or return  if the byte stream is emptyfoldlReturns  if the byte stream is empty,  otherwisefoldl-Return the length of the byte stream in bytesfoldl(all predicate) returns % if all bytes satisfy the predicate,  otherwisefoldl(any predicate) returns * if any byte satisfies the predicate,  otherwisefoldlComputes the maximum bytefoldlComputes the minimum bytefoldl (elem w8) returns ( if the byte stream has a byte equal to w8,  otherwisefoldl (notElem w8) returns ( if the byte stream has a byte equal to w8,  otherwisefoldl(find predicate)< returns the first byte that satisfies the predicate or # if no byte satisfies the predicatefoldl (index n) returns the nth byte of the byte stream, or 6 if the stream has an insufficient number of bytesfoldl(elemIndex w8)1 returns the index of the first byte that equals w8 , or  if no byte matchesfoldl(findIndex predicate) returns the index of the first byte that satisfies the predicate, or # if no byte satisfies the predicatefoldlcount w8 returns the number of times w8 appearsfoldlCombine all the strict  chunks to build a lazy    Safe-Inferred[foldlLike , but monadic.A '# m a b' processes elements of type a, and results in a monadic value of type m b.foldlScanM   step   initial   extractfoldlEfficient representation of a left map-with-accumulator that preserves the scan's step function and initial accumulator.This allows the  instance to assemble derived scans that traverse the container only onceA '! a b' processes elements of type a) replacing each with a value of type b.foldlScan   step   initial foldlApply a strict left  to a  containerfoldlLike " but start scanning from the rightfoldlLike  but monadicfoldl Convert a  into a prescan"Prescan" means that the last element of the scan is not includedfoldl Convert a  into a postscan"Postscan" means that the first element of the scan is not includedfoldlUpgrade a scan to accept the  typefoldl.Upgrade a more traditional scan to accept the  typefoldl%Upgrade a monadic scan to accept the  typefoldl6Upgrade a more traditional monadic scan to accept the  typefoldl Generalize a  to a  generalize (pure r) = pure r generalize (f <*> x) = generalize f <*> generalize xfoldlSimplify a pure  to a  simplify (pure r) = pure r simplify (f <*> x) = simplify f <*> simplify xfoldlShift a 3 from one monad to another with a morphism such as  or liftIO!; the effect is the same as  .foldl(premap f scaner) returns a new  where f is applied at each step 6scan (premap f scaner) list = scan scaner (map f list) 4premap id = id premap (f . g) = premap g . premap f premap k (pure r) = pure r premap k (f <*> x) = premap k f <*> premap k xfoldl(premapM f scaner) returns a new - where f is applied to each input element  x) = premapM k f <*> premapM k xfoldlThis is same as normal function composition, except slightly more efficient. The same trick is used in base  http://hackage.haskell.org/package/base-4.11.1.0/docs/src/Data.Functor.Utils.html#%23. and lens http://hackage.haskell.org/package/lens-4.17/docs/Control-Lens-Internal-Coerce.html#v:-35-..9  !"#$"#%&''()**++,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~,-3478;<BDFGHIJK34BCDE_`iqrz,-3478;<BDFGHIJK./0_`abcdeij    #foldl-1.4.18-5FARHE1laerCIzPP1GLFvp Control.FoldlControl.Foldl.ByteStringControl.Foldl.TextControl.Foldl.NonEmpty Control.ScanlfoldlControl.Foldl.InternalControl.Foldl.OpticsControl.Foldl.Util.MVectorControl.Foldl.Util.VectorControl.Monad.MorphhoistControl.Monad.Trans.ClassliftData.Foldable1 foldlMap1base Data.FoldableFoldableghc-primGHC.Prim RealWorldGHC.WordWord8bytestring-0.11.5.2Data.ByteString.Internal.Type ByteString(primitive-0.9.0.0-2Ut0u6h4ou624O572IFc4SControl.Monad.Primitive PrimMonad text-2.0.2Data.Text.InternalText&vector-0.13.2.0-9fdEvIbFXre8iFIdlFPmtkData.Vector.Generic.BaseVectorMutableHandlerMEndoMappEndoMHandlerFoldMFoldfoldfoldMscanprescanpostscanmconcatfoldMapheadlastlastDeflastNnulllengthandorallanysumproductmeanvariancestdmaximum maximumByminimum minimumByelemnotElemfindindex elemIndex findIndexlookuprandomrandomNmapM_sink genericLength genericIndexlistrevListnubeqNubsethashSetmap foldByKeyMaphashMapfoldByKeyHashMapvectorvectorMpurelypurely_impurely impurely_ generalizesimplifyhoistslifts duplicateM_Fold1premappremapMpostmapM prefilter prefilterM predropWhiledropdropMhandlesfoldOverhandlesM foldOverMfoldedfilteredgroupByeithereitherMnest$fFloatingFold$fFractionalFold $fNumFold $fMonoidFold$fSemigroupoidTYPEFold$fSemigroupFold $fExtendFold$fApplicativeFold $fComonadFold$fCostrongFold$fCosieveFoldList $fClosedFold $fChoiceFold$fProfunctorFold $fFunctorFold$fFloatingFoldM$fFractionalFoldM $fNumFoldM $fMonoidFoldM$fSemigroupFoldM$fProfunctorFoldM $fExtendFoldM$fApplicativeFoldM$fFunctorFoldM $fMonoidEndoM$fSemigroupEndoMcountlazyHandler1 FromMaybe appFromMaybeFold1Fold1_fold1fromFoldtoFoldnonEmptysconcatfolded1$fFloatingFold1$fFractionalFold1 $fNumFold1$fArrowChoiceFold1 $fArrowFold1 $fStrongFold1$fCategoryTYPEFold1$fSemigroupoidTYPEFold1 $fMonoidFold1$fSemigroupFold1 $fExtendFold1$fApplicativeFold1$fCosieveFold1NonEmpty $fClosedFold1 $fChoiceFold1$fProfunctorFold1$fFunctorFold1$fSemigroupFromMaybeScanMScanscanrscanMarrM$fFloatingScan$fFractionalScan $fNumScan $fMonoidScan$fSemigroupScan $fArrowScan$fCategoryTYPEScan$fProfunctorScan$fApplicativeScan $fFunctorScan$fFloatingScanM$fFractionalScanM $fNumScanM $fMonoidScanM$fSemigroupScanM $fArrowScanM$fCategoryTYPEScanM$fProfunctorScanM$fApplicativeScanM$fFunctorScanM$fApplicativeReverseState$fFunctorReverseStateEither' Data.EitherEitherMaybe' GHC.MaybeMaybestricthushJust'Nothing'Left'Right'PairPrism'Prismprism_Left_Right#writeListInReverseOrderStartingFromfromReverseListN initializedGHC.Base ApplicativeData.Traversable TraversablemappendmemptyNothing GHC.TypesTrueFalseGHC.NumNumGHC.RealIntegralcontainers-0.6.7Data.Map.InternalMap2unordered-containers-0.2.20-IKspZ9X65m0FyUIlbDwiCVData.HashMap.InternalHashMap$comonad-5.0.9-69PoOSldBoF8P08t9B7aTDControl.ComonadComonadNonEmpty<>transformers-0.6.1.0#.