úÎD±>Å,      !"#$%&'()*+ Safe-Inferred Strict Pair The shape of a ,  A reified -. Strict .  Reversed '[]'  /01234567      /01234567 TrustworthyPartially 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 (+) 06Apply a  to a single element of input Lift a  into a 8. 'This acts like a generalized notion of " costrength",  when applied to a , causing it to return the 7 left-most value that fails to match the Prism, or the ) result of accumulating rewrapped in the 8 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  , beneath :: Prism s t a b -> p a b -> p s t , beneath :: Iso s t a b -> p a b -> p s t 9:;   9:; TrustworthyIConstruct a Moore machine from a state valuation and transition function < efficient , leaky  =>?@ABCDEF< =>?@ABCDEF< Trustworthy strict left folds "PConstruct a strict Moore machine from a state valuation and transition function G efficient , leaky  HI !"JKLMNOPQRSG !" !"HI !"JKLMNOPQRSG Trustworthy#A , caught in amber. T efficient  , efficient  #$UVWXYZ[\]^T#$#$ #$UVWXYZ[\]^T Trustworthy_leaky  , efficient  %&`abcdefghi_%&%& %&`abcdefghi_ non-portable experimentalEdward Kmett <ekmett@gmail.com> Safe-Inferred ((4 is a folding homomorphism to a strict left folding    xs (( Æ) "a  xs Æ   xs (( Æ) "a ( ( xs Æ)   l xs (( Æ) "a ( ( l xs Æ)   (( Æ) xs "a ( ( Æ xs)   l (( Æ) xs "a ( ( l Æ xs)  left' (( Æ) "a ( (left' Æ)  right' (( Æ) "a ( (right' Æ)  dimap l r (( Æ) "a ( (dimap l r Æ)  extract (( Æ) "a extract Æ  pure a "a ( (pure a)  ( Æ <*> ( È "a ( (Æ <*> È)  j a "a ( (j a)  ( Æ k ( . k "a ( (Æ k k)   p (( Æ) "a ( ( p Æ)   a (( Æ) "a ( ( a Æ) **1 is a folding homomorphism to a monoidal folding    xs (* Æ) "a  xs Æ   xs (* Æ) "a * ( xs Æ)   l xs (* Æ) "a * ( l xs Æ)   (* Æ) xs "a * ( Æ xs)   l (* Æ) xs "a * ( l Æ xs)  left' (* Æ) "a * (left' Æ)  right' (* Æ) "a * (right' Æ)  dimap l r (* Æ) "a * (dimap l r Æ)  extract (* Æ) "a extract Æ  pure a "a * (pure a)  * Æ <*> * È "a * (Æ <*> È)  j a "a * (j a)  * Æ k * . k "a * (Æ k k)   p (* Æ) "a * ( p Æ)   a (* Æ) "a * ( a Æ) ++. is a folding homomorphism to a right folding    xs (+ Æ) "a  xs Æ   xs (+ Æ) "a + ( xs Æ)   l xs (+ Æ) "a + ( l xs Æ)   (+ Æ) xs "a + ( Æ xs)   l (+ Æ) xs "a + ( l Æ xs)  left' (+ Æ) "a + (left' Æ)  right' (+ Æ) "a + (right' Æ)  dimap l r (+ Æ) "a + (dimap l r Æ)  extract (+ Æ) "a extract Æ  pure a "a + (pure a)  + Æ <*> + È "a + (Æ <*> È)  j a "a + (j a)  + Æ k + . k "a + (Æ k k)   p (+ Æ) "a + ( p Æ)   a (+ Æ) "a + ( a Æ) lBWe can convert from a lazy left folding to a strict left folding. m%We can convert a lazy fold to itself nFWe can convert from a strict left folding to a right or monoidal fold oDWe can convert from a lazy left folding to a right or monoidal fold p9We can convert from a monoidal fold to a lazy right fold q9We can convert from a lazy right fold to a monoidal fold rs'()*+lmnopq !#$%&'()*+ !#$%&)*+'( rs'()*+lmnopqt       !"##$%%&''(()*+,-./0.12.3456789:;<=>?@  ABCDEFGHIJKLMNNOPQRSTUVWXYZ[\]^_`abcdefghijklmn.op.oqrstuvwxxy folds-0.2Data.Fold.InternalData.Fold.Class Data.Fold.L Data.Fold.L' Data.Fold.M Data.Fold.R Data.FoldPair'TreeTwoOneZeroNrunNMaybe'Just'Nothing'SnocListNilSnocmaybe'Foldingprefixprefix1prefixOfpostfixpostfix1 postfixOfrunrun1runOf filtering interspersingbeneathLunfoldLL'unfoldL'MRAsL'asL'AsRMasMasRbase Data.FoldablefoldMap Data.MonoidMonoid Data.MaybeMaybe $fMonoidPair'$fTraversableTree$fFoldableTree $fFunctorTree $fMonoidN$fFoldableMaybe'$fTraversableSnocList$fFoldableSnocList$fFunctorSnocList lens-3.9.0.3Control.Lens.TypePrism $fFoldableOne $fFoldingL$fComonadApplyL$fApplyL $fExtendL$fMonadL$fBindL$fApplicativeL $fComonadL $fFunctorL $fChoiceL $fProfunctorL $fFoldingL'Pair$fComonadApplyL' $fApplyL' $fExtendL' $fMonadL'$fBindL'$fApplicativeL' $fComonadL' $fFunctorL' $fChoiceL'$fProfunctorL' $fFoldingM$fComonadApplyM$fApplyM $fExtendM$fMonadM$fBindM$fApplicativeM $fComonadM $fFunctorM $fChoiceM $fProfunctorM $fFoldingR$fComonadApplyR$fApplyR $fExtendR$fApplicativeR$fMonadR$fBindR $fComonadR $fFunctorR $fChoiceR $fProfunctorRGHC.Basereturn>>=$fAsL'L$fAsL'L'$fAsRML'$fAsRML$fAsRMM$fAsRMRBox