cRS      !"#$%&'()*+,-./0123456789:;<=>?@ABCDE F G H I J K L M N O P Q R None&+-./4>GILN Strict Pair A reified S.The shape of a T A reified U.Strict V" Reversed '[]'ZWXYZ[\]^_`  !"#$%&'abcdefghijklmnopqrstuvwxyz{|}~(  !"#$%&'("#$ ! % &';WXYZ[\]^_`    !"#$%&'abcdefghijklmnopqrstuvwxyz{|}~ Trustworthy1IN)Partially apply a (# to some initial input on the left.-Apply a ( to a container full of input:$run ["hello","world"] $ L id (++) [] "helloworld"run [1,2,3] $ L id (+) 063Apply a ( to a single element of input5Lift a ( into a .HThis acts like a generalized notion of "costrength", when applied to a ({, causing it to return the left-most value that fails to match the Prism, or the result of accumulating rewrapped in the  if everything matches.9run [Left 1, Left 2, Left 3] $ beneath _Left $ R id (+) 0Left 6;run [Left 1, Right 2, Right 3] $ beneath _Left $ R id (+) 0Right 2 Vbeneath :: Prism s t a b -> p a b -> p s t beneath :: Iso s t a b -> p a b -> p s t ()*+,-./012345()*+,-./01234501234()*+,-./5()*+,-./012345 Trustworthy 47;>ILN6A Moore Machine8HConstruct a Moore machine from a state valuation and transition function efficient ), leaky +678678678678 Trustworthy 47;>ILN9)A strict left fold / strict Moore machine;OConstruct a strict Moore machine from a state valuation and transition function efficient ), leaky +9:;9:;9:;9:; Trustworthy7;>LN<A Mealy Machine<=<=<=<= Trustworthy7;>LN>A strict Mealy Machine>?>?>?>? Trustworthy 47;>ILN@A T+ caught in amber. a.k.a. a monoidal reducer efficient ) , efficient +@A@A@A@A Trustworthy7;>LNBA semigroup reducerBCD     BCDBCDBCD       Trustworthy 47;>ILNE&right folds / a reversed Moore machineleaky ) , efficient +EF !"#EFEFEF !"#  Trustworthy7;>LNGA reversed Mealy machineGH$%&'()*+,-./0123456789:;GHGHGH$%&'()*+,-./0123456789:; (C) 2009-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> experimental non-portableNone1 JJ3 is a folding homomorphism to a strict left folding - xs (J ) "a - xs  ) xs (J ) "a J () xs ) * l xs (J ) "a J (* l xs ) + (J ) xs "a J (+  xs) , l (J ) xs "a J (, l  xs) left' (J ) "a J (left' ) right' (J ) "a J (right' ) dimap l r (J ) "a J (dimap l r ) extract (J ) "a extract  < a "a J (< a) J  = J  "a J ( = ) > a "a J (> a) J  ? J . k "a J ( ? k) / p (J ) "a J (/ p ) 4 a (J ) "a J (4 a ) L+Scan homomorphism to a strict Mealy machineNN0 is a folding homomorphism to a monoidal folding - xs (N ) "a - xs  ) xs (N ) "a N () xs ) * l xs (N ) "a N (* l xs ) + (N ) xs "a N (+  xs) , l (N ) xs "a N (, l  xs) left' (N ) "a N (left' ) right' (N ) "a N (right' ) dimap l r (N ) "a N (dimap l r ) extract (N ) "a extract  < a "a N (< a) N  = N  "a N ( = ) > a "a N (> a) N  ? N . k "a N ( ? k) / p (N ) "a N (/ p ) 4 a (N ) "a N (4 a ) OO- is a folding homomorphism to a right folding - xs (O ) "a - xs  ) xs (O ) "a O () xs ) * l xs (O ) "a O (* l xs ) + (O ) xs "a O (+  xs) , l (O ) xs "a O (, l  xs) left' (O ) "a O (left' ) right' (O ) "a O (right' ) dimap l r (O ) "a O (dimap l r ) extract (O ) "a extract  < a "a O (< a) O  = O  "a O ( = ) > a "a O (> a) O  ? O . k "a O ( ? k) / p (O ) "a O (/ p ) 4 a (O ) "a O (4 a ) QQ. is a scan homomorphism to a semigroup reducerRQ' is a scan homomorphism to a right scan@AWe can convert from a lazy left folding to a strict left folding.A$We can convert a lazy fold to itselfBEWe can convert from a strict left folding to a right or monoidal foldCCWe can convert from a lazy left folding to a right or monoidal foldD8We can convert from a monoidal fold to a lazy right foldE8We can convert from a lazy right fold to a monoidal foldIJKLMNOPQR@AFGHIBCDEJKLMNOPQ(()*+,-./012345679:<=>?@ABCEFGHIJKLMNOPQR(01234()*+,-./5<=>?BCGH679:@AEFPQRKLMNOIJIJKLMNOPQR@AFGHIBCDEJKLMNOPQR    !"#$%&'()*+,-./0123456789:;;<==>??@@AABBC D D E E F G H I J K L M N OPQRSTUSVWSVXYZ[\]^_`Yabcdefghijklmnopqrstuvwxyz{|}~                        ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 :SV;SV<SV=SV> ? @ A B C D E F G H I J K L M N O PQfolds_Dav94QVRKTb5bdim52r5uyData.Fold.InternalData.Fold.Class Data.Fold.L Data.Fold.L' Data.Fold.L1 Data.Fold.L1' Data.Fold.M Data.Fold.M1 Data.Fold.R Data.Fold.R1 Data.Fold FreeSemigrouprunFreeSemigroup FreeMonoid runFreeMonoidTree1Bin1Tip1List1Cons1LastBoxAnPair'SrunSTreeZeroOneTwoNrunNMaybe'Nothing'Just' SnocList1Snoc1FirstSnocListSnocNilmaybe' foldDeRef foldDeRef1FoldingprefixprefixOfpostfix postfixOfrunrunOf filteringScanprefix1postfix1run1 interspersingbeneathLunfoldLL'unfoldL'L1L1'MM1runM1RR1AsL'asL'AsL1'asL1'AsRMasMasRAsRM1asM1asR1semig_JFY48pwG5NAKkalkWeHKCJData.Semigroup Semigroupbase Data.FoldablefoldMapGHC.BaseMonoidMaybeT1ABMuRef1DeRef1muRef1TT0T2$fBitraversable1T1$fBifoldable1T1$fBitraversableT1$fBifoldableT1 $fBifunctorT1 $fMuRef1Tree1 $fMuRefTree1$fBitraversableT $fBifoldableT $fBifunctorT $fMuRef1Tree $fMuRefTree$fFoldable1FreeSemigroup$fFoldableFreeSemigroup$fFoldableFreeMonoid$fTraversableTree1$fFoldableTree1$fFunctorTree1$fTraversableList1$fFoldableList1$fFunctorList1$fTraversableBox $fFoldableBox $fFunctorBox$fTraversableAn $fFoldableAn $fFunctorAn $fMonoidPair' $fSemigroupS$fTraversableTree$fFoldableTree $fFunctorTree $fMonoidN$fFoldableMaybe'$fTraversableSnocList1$fFoldableSnocList1$fFunctorSnocList1$fTraversableSnocList$fFoldableSnocList$fFunctorSnocListlens_AgwMviN2kfd4s47HHly0DuControl.Lens.TypePrism $fFoldingL $fMonadFixL$fCorepresentableL $fClosedL $fCosieveL[] $fCostrongL$fMonadReader[]L$fRepresentableL$fDistributiveL$fComonadApplyL$fApplyL $fExtendL $fMonadZipL$fMonadL$fBindL$fApplicativeL $fComonadL $fFunctorL $fChoiceL $fProfunctorL$fScanL $fFoldingL'Pair $fMonadFixL'$fMonadReader[]L' $fCosieveL'[]$fCorepresentableL' $fClosedL' $fCostrongL'$fRepresentableL'$fDistributiveL'$fComonadApplyL' $fApplyL' $fExtendL' $fMonadZipL' $fMonadL'$fBindL'$fApplicativeL' $fComonadL' $fFunctorL' $fChoiceL'$fProfunctorL'$fScanL'walk $fMonadFixL1$fMonadReaderNonEmptyL1 $fClosedL1$fRepresentableL1$fDistributiveL1$fCorepresentableL1 $fCostrongL1$fCosieveL1NonEmpty$fArrowChoiceL1 $fChoiceL1 $fStrongL1$fProfunctorL1 $fArrowL1 $fCategory*L1$fSemigroupoid*L1 $fMonadZipL1 $fMonadL1$fApplicativeL1 $fApplyL1 $fPointedL1 $fFunctorL1$fScanL1 $fMonadFixL1'$fMonadReaderNonEmptyL1' $fClosedL1'$fRepresentableL1'$fDistributiveL1'$fCorepresentableL1' $fCostrongL1'$fCosieveL1'NonEmpty$fArrowChoiceL1' $fChoiceL1' $fStrongL1'$fProfunctorL1' $fArrowL1'$fCategory*L1'$fSemigroupoid*L1' $fMonadL1'$fApplicativeL1' $fApplyL1' $fPointedL1' $fFunctorL1' $fScanL1' $fFoldingM $fMonadFixM $fCostrongM$fRepresentableM$fMonadReaderFreeMonoidM$fCorepresentableM$fCosieveMFreeMonoid $fClosedM$fDistributiveM$fComonadApplyM$fApplyM $fExtendM $fMonadZipM$fMonadM$fBindM$fApplicativeM $fComonadM $fFunctorM $fChoiceM $fProfunctorM$fScanM $fMonadFixM1$fMonadReaderFreeSemigroupM1 $fCostrongM1$fRepresentableM1$fCorepresentableM1$fCosieveM1FreeSemigroup$fDistributiveM1 $fClosedM1$fArrowChoiceM1 $fChoiceM1 $fStrongM1$fProfunctorM1 $fArrowM1 $fCategory*M1$fSemigroupoid*M1 $fMonadZipM1 $fMonadM1$fApplicativeM1 $fApplyM1 $fPointedM1 $fFunctorM1$fScanM1 $fFoldingR $fMonadFixR $fClosedR$fMonadReader[]R $fCosieveR[]$fCorepresentableR $fCostrongR$fRepresentableR$fDistributiveR$fComonadApplyR$fApplyR $fExtendR$fApplicativeR $fMonadZipR$fMonadR$fBindR $fComonadR $fFunctorR $fChoiceR $fProfunctorR$fScanRcata $fMonadFixR1$fMonadReaderNonEmptyR1$fRepresentableR1$fDistributiveR1$fCorepresentableR1 $fCostrongR1$fCosieveR1NonEmpty $fClosedR1$fArrowChoiceR1 $fChoiceR1 $fStrongR1$fProfunctorR1 $fArrowR1 $fCategory*R1$fSemigroupoid*R1 $fMonadZipR1 $fMonadR1$fApplicativeR1 $fApplyR1 $fPointedR1 $fFunctorR1$fScanR1pure<*>return>>=$fAsL'L$fAsL'L'$fAsRML'$fAsRML$fAsRMM$fAsRMR $fAsL1'L'$fAsL1'L $fAsL1'L1 $fAsL1'L1' $fAsRM1R1$fAsRM1R $fAsRM1M1$fAsRM1M $fAsRM1L1' $fAsRM1L1 $fAsRM1L'$fAsRM1L