Data.Lens.Fold
- Package
- purescript-profunctor-lenses
- Repository
- purescript-contrib/purescript-profunctor-lenses
This module defines functions for working with folds.
#allOf Source
allOf :: forall s t a b r. HeytingAlgebra r => Fold (Conj r) s t a b -> (a -> r) -> s -> rWhether all foci of a Fold satisfy a predicate.
#anyOf Source
anyOf :: forall s t a b r. HeytingAlgebra r => Fold (Disj r) s t a b -> (a -> r) -> s -> rWhether any focus of a Fold satisfies a predicate.
#andOf Source
andOf :: forall s t a b. HeytingAlgebra a => Fold (Conj a) s t a b -> s -> aThe conjunction of all foci of a Fold.
#orOf Source
orOf :: forall s t a b. HeytingAlgebra a => Fold (Disj a) s t a b -> s -> aThe disjunction of all foci of a Fold.
#productOf Source
productOf :: forall s t a b. Semiring a => Fold (Multiplicative a) s t a b -> s -> aThe product of all foci of a Fold.
#sequenceOf_ Source
sequenceOf_ :: forall f s t a b. Applicative f => Fold (Endo Function (f Unit)) s t (f a) b -> s -> f UnitSequence the foci of a Fold, pulling out an Applicative, and ignore
the result. If you need the result, see sequenceOf for Traversals.
#traverseOf_ Source
traverseOf_ :: forall f s t a b r. Applicative f => Fold (Endo Function (f Unit)) s t a b -> (a -> f r) -> s -> f UnitTraverse the foci of a Fold, discarding the results.
#has Source
has :: forall s t a b r. HeytingAlgebra r => Fold (Disj r) s t a b -> s -> rDetermines whether a Fold has at least one focus.
#hasn't Source
hasn't :: forall s t a b r. HeytingAlgebra r => Fold (Conj r) s t a b -> s -> rDetermines whether a Fold does not have a focus.
#replicated Source
replicated :: forall a b t r. Monoid r => Int -> Fold r a b a tReplicates the elements of a fold.
#ifoldMapOf Source
ifoldMapOf :: forall r i s t a b. IndexedFold r i s t a b -> (i -> a -> r) -> s -> rFold map over an IndexedFold.
#ifoldrOf Source
ifoldrOf :: forall i s t a b r. IndexedFold (Endo Function r) i s t a b -> (i -> a -> r -> r) -> r -> s -> rRight fold over an IndexedFold.
#ifoldlOf Source
ifoldlOf :: forall i s t a b r. IndexedFold (Dual (Endo Function r)) i s t a b -> (i -> r -> a -> r) -> r -> s -> rLeft fold over an IndexedFold.
#iallOf Source
iallOf :: forall i s t a b r. HeytingAlgebra r => IndexedFold (Conj r) i s t a b -> (i -> a -> r) -> s -> rWhether all foci of an IndexedFold satisfy a predicate.
#ianyOf Source
ianyOf :: forall i s t a b r. HeytingAlgebra r => IndexedFold (Disj r) i s t a b -> (i -> a -> r) -> s -> rWhether any focus of an IndexedFold satisfies a predicate.
#itraverseOf_ Source
itraverseOf_ :: forall i f s t a b r. Applicative f => IndexedFold (Endo Function (f Unit)) i s t a b -> (i -> a -> f r) -> s -> f UnitTraverse the foci of an IndexedFold, discarding the results.
#iforOf_ Source
iforOf_ :: forall i f s t a b r. Applicative f => IndexedFold (Endo Function (f Unit)) i s t a b -> s -> (i -> a -> f r) -> f UnitFlipped version of itraverseOf_.
Re-exports from Data.Lens.Types
- Modules
- Data.
Lens - Data.
Lens. AffineTraversal - Data.
Lens. At - Data.
Lens. Common - Data.
Lens. Fold - Data.
Lens. Fold. Partial - Data.
Lens. Getter - Data.
Lens. Grate - Data.
Lens. Index - Data.
Lens. Indexed - Data.
Lens. Internal. Bazaar - Data.
Lens. Internal. Exchange - Data.
Lens. Internal. Focusing - Data.
Lens. Internal. Forget - Data.
Lens. Internal. Grating - Data.
Lens. Internal. Indexed - Data.
Lens. Internal. Market - Data.
Lens. Internal. Re - Data.
Lens. Internal. Shop - Data.
Lens. Internal. Stall - Data.
Lens. Internal. Tagged - Data.
Lens. Internal. Wander - Data.
Lens. Internal. Zipping - Data.
Lens. Iso - Data.
Lens. Iso. Newtype - Data.
Lens. Lens - Data.
Lens. Lens. Product - Data.
Lens. Lens. Tuple - Data.
Lens. Lens. Unit - Data.
Lens. Lens. Void - Data.
Lens. Prism - Data.
Lens. Prism. Coproduct - Data.
Lens. Prism. Either - Data.
Lens. Prism. Maybe - Data.
Lens. Record - Data.
Lens. Setter - Data.
Lens. Traversal - Data.
Lens. Types - Data.
Lens. Zoom