úÎ!÷:ëbē      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤Ĩϧ¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩšSafe [ēfoldl A strict ģŧfoldl A strict ŊžfoldlConvert ŧ to ŊŋfoldlConvert Ŋ to ŧĀfoldlConvert ē to Ŋ ÁÂēÃÄŧÅÆžŋĀSafeQV ÎĮČÉĘË Trustworthy<CQV•ęNfoldl$A Handler for the upstream input of  3Any lens, traversal, or prism will type-check as a  foldl xinstance 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   extractfoldlEfficient representation of a left fold that preserves the fold's step function, initial accumulator, and extraction functionThis allows the ĖM 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 Convert a  into a prescan for any Í typeA"Prescan" means that the last element of the scan is not includedfoldl Convert a  into a postscan for any Í typeC"Postscan" means that the first element of the scan is not includedfoldl)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 emptyfoldl[Get 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<Compute a numerically stable arithmetic mean of all elements%foldlDCompute a numerically stable (population) variance over all elements&foldlRCompute a numerically stable (population) standard deviation over all elements'foldlComputes the maximum element(foldlNComputes the maximum element with respect to the given comparison function)foldlComputes the minimum element*foldlNComputes the minimum element with respect to the given comparison function+foldl(elem a) returns Ņ* if the container has an element equal to a, Ō otherwise,foldl (notElem a) returns Ō* if the container has an element equal to a, Ņ otherwise-foldl(find predicate)? returns the first element that satisfies the predicate or Đ& if no element satisfies the predicate.foldl (index n) returns the n th element of the container, or Đ< if the container has an insufficient number of elements/foldl (elemIndex a)4 returns the index of the first element that equals a , or Đ if no element matches0foldl(findIndex predicate)M returns the index of the first element that satisfies the predicate, or Đ& if no element satisfies the predicate1foldl (lookup a)A returns the element paired with the first matching item, or Đ if none matches2foldl/Pick a random element, using reservoir sampling3foldl6Pick several random elements, using reservoir sampling4foldlAConverts an effectful function to a fold. Specialized version of 5.5foldl(Converts an effectful function to a fold Qsink (f <> 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.?foldlFold pairs into a hash-map.@foldlFold all values into a vectorAfoldlFold all values into a vectorThis is more efficient than @ but is impureBfoldlUpgrade a fold to accept the  typeCfoldl.Upgrade a more traditional fold to accept the  typeDfoldl%Upgrade a monadic fold to accept the   typeEfoldl6Upgrade a more traditional monadic fold to accept the   typeFfoldl Generalize a  to a  Rgeneralize (pure r) = pure r generalize (f <*> x) = generalize f <*> generalize xGfoldlSimplify a pure   to a  Jsimplify (pure r) = pure r simplify (f <*> x) = simplify f <*> simplify xHfoldlShift a  3 from one monad to another with a morphism such as lift or liftIO!; the effect is the same as .IfoldlAllows to continue feeding a  4 even after passing it to a function that closes it. For pure s, this is provided by the Õ instance.Jfoldl _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.Kfoldl(premap f folder) returns a new  where f is applied at each step 6fold (premap f folder) list = fold folder (map f list)!fold (premap Sum mconcat) [1..10]Sum {getSum = 55}fold mconcat (map Sum [1..10])Sum {getSum = 55} 4premap id = id premap (f . g) = premap g . premap f Jpremap k (pure r) = pure r premap k (f <*> x) = premap k f <*> premap k xLfoldl(premapM f folder) returns a new  - where f is applied to each input element <premapM return = id premapM (f <=< g) = premap g . premap f NpremapM k (pure r) = pure r premapM k (f <*> x) = premapM k f <*> premapM k xMfoldl(prefilter f folder) returns a new O where the folder's input is used only when the input satisfies a predicate fThis can also be done with O (handles (filtered f)) but  prefilter1 does not need you to depend on a lens library. <fold (prefilter p folder) list = fold folder (filter p list)/fold (prefilter (>5) Control.Foldl.sum) [1..10]40,fold Control.Foldl.sum (filter (>5) [1..10])40Nfoldl(prefilterM f folder) returns a new X where the folder's input is used only when the input satisfies a monadic predicate f. ?foldM (prefilterM p folder) list = foldM folder (filter p list)Ofoldl(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]]55^fold (handles (traverse.traverse) sum) [[Nothing, Just 2, Just 7],[Just 13, Nothing, Just 20]]42*fold (handles (filtered even) sum) [1..10]30<fold (handles _2 mconcat) [(1,"Hello "),(2,"World"),(3,"!")]"Hello World!" 8handles id = id handles (f . g) = handles f . handles g Nhandles t (pure r) = pure r handles t (f <*> x) = handles t f <*> handles t xPfoldl(foldOver f folder xs)M folds all values from a Lens, Traversal, Prism or Fold with the given folder+foldOver (_Just . both) L.sum (Just (2, 3))5%foldOver (_Just . both) L.sum Nothing0 0L.foldOver f folder xs == L.fold folder (xs^..f) 9L.foldOver (folded.f) folder == L.fold (handles f folder) L.foldOver folded == L.foldQfoldl(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) rQ obeys these laws: <handlesM id = id handlesM (f . g) = handlesM f . handlesM g RhandlesM t (pure r) = pure r handlesM t (f <*> x) = handlesM t f <*> handlesM t xRfoldl(foldOverM f folder xs)Y folds all values from a Lens, Traversal, Prism or Fold monadically with the given folder <L.foldOverM (folded.f) folder == L.foldM (handlesM f folder) L.foldOverM folded == L.foldMSfoldl ^folded :: Foldable t => Fold (t a) a handles folded :: Foldable t => Fold a r -> Fold (t a) rTfoldl*fold (handles (filtered even) sum) [1..10]306foldM (handlesM (filtered even) (mapM_ print)) [1..10]246810Ufoldl Perform a ‹ while grouping the data according to a specified group projection function. Returns the folded result grouped as a map keyed by the group.Vfoldl=Combine two folds into a fold over inputs for either of them.WfoldlECombine two monadic folds into a fold over inputs for either of them.U  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWU  !"#$%&'()*+,-.1/023456789:;<=>?@ABCDEFGHIJKLMN OP QRSTUVWNone¯mfoldlApply a strict left  to a lazy bytestringnfoldlApply a strict monadic left   to a lazy bytestringofoldl.Get the first byte of a byte stream or return Đ if the stream is emptypfoldl-Get the last byte of a byte stream or return Đ if the byte stream is emptyqfoldlReturns Ņ if the byte stream is empty, Ō otherwiserfoldl-Return the length of the byte stream in bytessfoldl(all predicate) returns Ņ% if all bytes satisfy the predicate, Ō otherwisetfoldl(any predicate) returns Ņ* if any byte satisfies the predicate, Ō otherwiseufoldlComputes the maximum bytevfoldlComputes the minimum bytewfoldl (elem w8) returns Ņ( if the byte stream has a byte equal to w8, Ō otherwisexfoldl (notElem w8) returns Ō( if the byte stream has a byte equal to w8, Ņ otherwiseyfoldl(find predicate)< returns the first byte that satisfies the predicate or Đ# if no byte satisfies the predicatezfoldl (index n) returns the nth byte of the byte stream, or Đ6 if the stream has an insufficient number of bytes{foldl(elemIndex w8)1 returns the index of the first byte that equals w8 , or Đ if no byte matches|foldl(findIndex predicate)J returns the index of the first byte that satisfies the predicate, or Đ# if no byte satisfies the predicate}foldlcount w8 returns the number of times w8 appears~foldlCombine all the strict  chunks to build a lazy  mnopqrstuvwxyz{|}~mnopqrtsuvwxyz{|}~ SafeĮ2foldlApply 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, Ō otherwise„foldl2Return the length of the text stream in characters…foldl(all predicate) returns Ņ. if all characters satisfy the predicate, Ō otherwise†foldl(any predicate) returns Ņ/ if any character satisfies the predicate, Ō otherwise‡foldlComputes the maximum characterˆfoldlComputes the minimum character‰foldl(elem c) returns Ņ- if the text stream has a character equal to c, Ō otherwiseŠfoldl (notElem c) returns Ō1 if the text stream has a character equal to c, Ņ otherwise‹foldl(find predicate)A returns the first character that satisfies the predicate or Đ( if no character satisfies the predicateŒfoldl (index n) returns the n$th character of the text stream, or Đ; if the stream has an insufficient number of charactersfoldl (elemIndex c)6 returns the index of the first character that equals c , or Đ if no character matchesŽfoldl(findIndex predicate)O returns the index of the first character that satisfies the predicate, or Đ, if no character satisfies the predicatefoldl (count c) returns the number of times c appearsfoldlCombine all the strict  chunks to build a lazy  €‚ƒ„…†‡ˆ‰Š‹ŒŽ€‚ƒ„†…‡ˆ‰Š‹ŒŽ None<CNQVęŗ‘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   extract“foldl|Efficient representation of a left map-with-accumulator that preserves the scan's step function and initial accumulator.This allows the ĖM 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 Í container–foldlLike •" but start scanning from the right—foldlLike • but monadic˜foldl Convert a  into a prescanA"Prescan" means that the last element of the scan is not included™foldl Convert a  into a postscanC"Postscan" means that the first element of the scan is not included›foldlUpgrade a scan to accept the “ typeœfoldl.Upgrade a more traditional scan to accept the “ typefoldl%Upgrade a monadic scan to accept the ‘ typežfoldl6Upgrade a more traditional monadic scan to accept the ‘ typeŸfoldl Generalize a “ to a ‘ Rgeneralize (pure r) = pure r generalize (f <*> x) = generalize f <*> generalize x foldlSimplify a pure ‘ to a “ Jsimplify (pure r) = pure r simplify (f <*> x) = simplify f <*> simplify xĄfoldlShift 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 Jpremap k (pure r) = pure r premap k (f <*> x) = premap k f <*> premap k xŖfoldl(premapM f scaner) returns a new ‘- where f is applied to each input element <premapM return = id premapM (f <=< g) = premap g . premap f NpremapM k (pure r) = pure r premapM k (f <*> x) = premapM k f <*> premapM k x×foldllThis is same as normal function composition, except slightly more efficient. The same trick is used in base  Vhttp://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{|}~$%+,/034:<>?@ABC€$%+,/034:<>?@ABC€‚‚ƒƒ&„…'(†UVWXYZ[^_‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œ žŸ  ĄĸŖ¤ĨĨϧ¨ŠĒĢŦ­Ž Ą¯ °ą Ą˛ Ąŗ Ą´ ĩļ ĩˇ ¸š ēģŧŊžŋĀÁÂÃ"foldl-1.4.5-DhjnMkulHTyKNvHNTLe4SA Control.FoldlControl.Foldl.ByteStringControl.Foldl.Text Control.ScanlControl.Foldl.InternalControl.Foldl.OpticsControl.Monad.Morphhoistbase Data.FoldableFoldableghc-primGHC.Prim RealWorldGHC.WordWord8bytestring-0.10.8.2Data.ByteString.Internal ByteString(primitive-0.6.4.0-39Pwmm1zkQX6bM7xFUT3JcControl.Monad.Primitive PrimMonad text-1.2.3.0Data.Text.InternalText&vector-0.12.0.1-GC2xzdMF0QQGz7ZCcRBJRLData.Vector.Generic.BaseMutableVectorHandlerMEndoMappEndoMHandlerFoldMFoldfoldfoldMscanprescanpostscanmconcatfoldMapheadlastlastDeflastNnulllengthandorallanysumproductmeanvariancestdmaximum maximumByminimum minimumByelemnotElemfindindex elemIndex findIndexlookuprandomrandomNmapM_sink genericLength genericIndexlistrevListnubeqNubsethashSetmaphashMapvectorvectorMpurelypurely_impurely impurely_ generalizesimplifyhoists duplicateM_Fold1premappremapM prefilter prefilterMhandlesfoldOverhandlesM foldOverMfoldedfilteredgroupByeithereitherM$fFloatingFold$fFractionalFold $fNumFold $fMonoidFold$fSemigroupoidTYPEFold$fSemigroupFold$fApplicativeFold $fComonadFold $fChoiceFold$fProfunctorFold $fFunctorFold$fFloatingFoldM$fFractionalFoldM $fNumFoldM $fMonoidFoldM$fSemigroupFoldM$fProfunctorFoldM$fApplicativeFoldM$fFunctorFoldM $fMonoidEndoM$fSemigroupEndoMcountlazyScanMScanscanrscanMarrM$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.BaseMaybestricthushPairLeft'Right'Just'Nothing'Prism'Prismprism_Left_Right ApplicativeData.Traversable TraversablemappendmemptyNothing GHC.TypesTrueFalseGHC.NumNumGHC.RealIntegral$comonad-5.0.4-L6HwQTKSMJbBJcpc6uKBTaControl.ComonadComonadtransformers-0.5.5.0Control.Monad.Trans.Classlift#.