w      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvSafew A strict xy A strict z{Convert y to z|Convert z to y}Convert w to z w~y{|} w~y{|}w~y{|} Trustworthy:AOTC$A Handler for the upstream input of 3Any lens, traversal, or prism will type-check as a  xinstance Monad m => Monoid (EndoM m a) where mempty = EndoM return mappend (EndoM f) (EndoM g) = EndoM (f <=< g)&A handler for the upstream input of a 3Any lens, traversal, or prism will type-check as a Like , but monadic.A '# m a b' processes elements of type a, and results in a monadic value of type m b.FoldM   step   initial   extractEfficient 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.Fold   step   initial   extract Apply a strict left  to a  container Like   , but monadic Convert a strict left  into a scan )Fold all values within a container using  and   Convert a "foldMap" to a /Get the first element of a container or return  if the container is empty.Get the last element of a container or return  if the container is empty[Get the last element of a container or return a default value if the container is emptyReturn the last N elementsReturns  if the container is empty,  otherwise"Return the length of the containerReturns  if all elements are ,  otherwiseReturns  if any element is ,  otherwise(all predicate) returns , if all elements satisfy the predicate,  otherwise(any predicate) returns - if any element satisfies the predicate,  otherwise Computes the sum of all elements$Computes the product of all elements<Compute a numerically stable arithmetic mean of all elementsDCompute a numerically stable (population) variance over all elementsRCompute a numerically stable (population) standard deviation over all elementsComputes the maximum elementNComputes the maximum element with respect to the given comparison functionComputes the minimum element NComputes the minimum element with respect to the given comparison function!(elem a) returns * if the container has an element equal to a,  otherwise" (notElem a) returns * if the container has an element equal to a,  otherwise#(find predicate)? returns the first element that satisfies the predicate or & if no element satisfies the predicate$ (index n) returns the n th element of the container, or < if the container has an insufficient number of elements% (elemIndex a)4 returns the index of the first element that equals a , or  if no element matches&(findIndex predicate)M returns the index of the first element that satisfies the predicate, or & if no element satisfies the predicate' (lookup a)A returns the element paired with the first matching item, or  if none matches(/Pick a random element, using reservoir sampling)6Pick several random elements, using reservoir sampling*AConverts an effectful function to a fold. Specialized version of +.+(Converts an effectful function to a fold Qsink (f <> g) = sink f <> sink g -- if `(<>)` is commutative sink mempty = mempty,Like , except with a more general  return value-Like $, except with a more general  argument.Fold all values into a list/-Fold all values into a list, in reverse order0 O(n log n)`. Fold values into a list with duplicates removed, while preserving their first occurrences1O(n^2)`. Fold values into a list with duplicates removed, while preserving their first occurrences2Fold values into a set3Fold all values into a vector4Upgrade a fold to accept the  type5.Upgrade a more traditional fold to accept the  type6%Upgrade a monadic fold to accept the  type76Upgrade a more traditional monadic fold to accept the  type8 Generalize a  to a  Rgeneralize (pure r) = pure r generalize (f <*> x) = generalize f <*> generalize x9Simplify a pure  to a  Jsimplify (pure r) = pure r simplify (f <*> x) = simplify f <*> simplify x:Shift a 3 from one monad to another with a morphism such as lift or liftIO!; the effect is the same as .;Allows to continue feeding a 4 even after passing it to a function that closes it. For pure s, this is provided by the  instance.< _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 z0. The initial accumulator is retrieved from the , the result is None for empty containers.=(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 x>(premapM f folder) returns a new - where f is applied to each input element 9foldM (premapM f folder) list = foldM folder (map f list) 6premapM id = id premapM (f . g) = premap g . premap f NpremapM k (pure r) = pure r premapM k (f <*> x) = premapM k f <*> premapM k x?(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 x@d@{foldOver f folder xs} 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.foldA(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) rA 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 xBq@{foldOverM f folder xs} 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.foldMC ^folded :: Foldable t => Fold (t a) a handles folded :: Foldable t => Fold a r -> Fold (t a) rD*fold (handles (filtered even) sum) [1..10]306foldM (handlesM (filtered even) (mapM_ print)) [1..10]246810c  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTJ  !"#$%&'()*+,-./0123456789:;<=>?@ABCDE  !"#$'%&()*+,-./0123456789:;<=>?@ABCDV  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTNoneUApply a strict left  to a lazy bytestringVApply a strict monadic left  to a lazy bytestringW.Get the first byte of a byte stream or return  if the stream is emptyX-Get the last byte of a byte stream or return  if the byte stream is emptyYReturns  if the byte stream is empty,  otherwiseZ-Return the length of the byte stream in bytes[(all predicate) returns % if all bytes satisfy the predicate,  otherwise\(any predicate) returns * if any byte satisfies the predicate,  otherwise]Computes the maximum byte^Computes the minimum byte_ (elem w8) returns ( if the byte stream has a byte equal to w8,  otherwise` (notElem w8) returns ( if the byte stream has a byte equal to w8,  otherwisea(find predicate)< returns the first byte that satisfies the predicate or # if no byte satisfies the predicateb (index n) returns the nth byte of the byte stream, or 6 if the stream has an insufficient number of bytesc(elemIndex w8)1 returns the index of the first byte that equals w8 , or  if no byte matchesd(findIndex predicate)J returns the index of the first byte that satisfies the predicate, or # if no byte satisfies the predicateecount w8 returns the number of times w8 appearsUVWXYZ[\]^_`abcdeUVWXYZ[\]^_`abcdeUVWXYZ\[]^_`abcdeUVWXYZ[\]^_`abcdeSafefApply a strict left  to lazy textgApply a strict monadic left  to lazy texth3Get the first character of a text stream or return  if the stream is emptyi2Get the last character of a text stream or return  if the text stream is emptyjReturns  if the text stream is empty,  otherwisek2Return the length of the text stream in charactersl(all predicate) returns . if all characters satisfy the predicate,  otherwisem(any predicate) returns / if any character satisfies the predicate,  otherwisenComputes the maximum characteroComputes the minimum characterp(elem c) returns - if the text stream has a character equal to c,  otherwiseq (notElem c) returns 1 if the text stream has a character equal to c,  otherwiser(find predicate)A returns the first character that satisfies the predicate or ( if no character satisfies the predicates (index n) returns the n$th character of the text stream, or ; if the stream has an insufficient number of characterst (elemIndex c)6 returns the index of the first character that equals c , or  if no character matchesu(findIndex predicate)O returns the index of the first character that satisfies the predicate, or , if no character satisfies the predicatev (count c) returns the number of times c appearsfghijklmnopqrstuvfghijklmnopqrstuvfghijkmlnopqrstuvfghijklmnopqrstuv        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX !#%&'()*Y !#%&'()*YZ[\]^[_`abcdefg[_h[ij[_k[_l[_mnopnoq[rs[tuvwxyyz{|}~n["foldl-1.2.3-CEjx4k4NpZhLFF9LmNMZ31 Control.FoldlControl.Foldl.ByteStringControl.Foldl.TextControl.Foldl.InternalControl.Monad.MorphhoistHandlerMEndoMappEndoMHandlerFoldMFoldfoldfoldMscanmconcatfoldMapheadlastlastDeflastNnulllengthandorallanysumproductmeanvariancestdmaximum maximumByminimum minimumByelemnotElemfindindex elemIndex findIndexlookuprandomrandomNmapM_sink genericLength genericIndexlistrevListnubeqNubsetvectorpurelypurely_impurely impurely_ generalizesimplifyhoists duplicateM_Fold1premappremapMhandlesfoldOverhandlesM foldOverMfoldedfiltered $fMonoidEndoM$fFloatingFoldM$fFractionalFoldM $fNumFoldM $fMonoidFoldM$fProfunctorFoldM$fApplicativeFoldM$fFunctorFoldM$fFloatingFold$fFractionalFold $fNumFold $fMonoidFold$fApplicativeFold $fComonadFold$fProfunctorFold $fFunctorFoldcountEither'base Data.EitherEitherMaybe'GHC.BaseMaybelazystricthushLeft'Right'Just'Nothing' Applicative Data.FoldableFoldablemappendmemptyNothingghc-prim GHC.TypesTrueFalseGHC.NumNumGHC.RealIntegralcomonad-5-Hr9r94p2QqzEA3aTbzZbEControl.ComonadComonad RandomNState_size _reservoir _position_gen VectorState IncompleteCompletePair3Pair maxChunkSizeGHC.Prim RealWorld(primitive-0.6.2.0-3HSsNCfUEEE4fjqDYVydYZControl.Monad.Primitive PrimMonad&vector-0.12.0.0-4Id7FElSeAC3wKuJGC9cw4Data.Vector.Generic.BaseMutableVectorGHC.WordWord8bytestring-0.10.8.1Data.ByteString.Internal ByteString#text-1.2.2.1-9Yh8rJoh8fO2JMLWffT3QsData.Text.InternalText