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 r b a t s. HeytingAlgebra r => Fold (Conj r) s t a b -> (a -> r) -> s -> r
Whether all foci of a Fold
satisfy a predicate.
#anyOf Source
anyOf :: forall r b a t s. HeytingAlgebra r => Fold (Disj r) s t a b -> (a -> r) -> s -> r
Whether any focus of a Fold
satisfies a predicate.
#andOf Source
andOf :: forall b a t s. HeytingAlgebra a => Fold (Conj a) s t a b -> s -> a
The conjunction of all foci of a Fold
.
#orOf Source
orOf :: forall b a t s. HeytingAlgebra a => Fold (Disj a) s t a b -> s -> a
The disjunction of all foci of a Fold
.
#productOf Source
productOf :: forall b a t s. Semiring a => Fold (Multiplicative a) s t a b -> s -> a
The product of all foci of a Fold
.
#sequenceOf_ Source
sequenceOf_ :: forall b a t s f. Applicative f => Fold (Endo Function (f Unit)) s t (f a) b -> s -> f Unit
Sequence the foci of a Fold
, pulling out an Applicative
, and ignore
the result. If you need the result, see sequenceOf
for Traversal
s.
#traverseOf_ Source
traverseOf_ :: forall r b a t s f. Applicative f => Fold (Endo Function (f Unit)) s t a b -> (a -> f r) -> s -> f Unit
Traverse the foci of a Fold
, discarding the results.
#has Source
has :: forall r b a t s. HeytingAlgebra r => Fold (Disj r) s t a b -> s -> r
Determines whether a Fold
has at least one focus.
#hasn't Source
hasn't :: forall r b a t s. HeytingAlgebra r => Fold (Conj r) s t a b -> s -> r
Determines whether a Fold
does not have a focus.
#replicated Source
replicated :: forall r t b a. Monoid r => Int -> Fold r a b a t
Replicates the elements of a fold.
#ifoldMapOf Source
ifoldMapOf :: forall b a t s i r. IndexedFold r i s t a b -> (i -> a -> r) -> s -> r
Fold map over an IndexedFold
.
#ifoldrOf Source
ifoldrOf :: forall r b a t s i. IndexedFold (Endo Function r) i s t a b -> (i -> a -> r -> r) -> r -> s -> r
Right fold over an IndexedFold
.
#ifoldlOf Source
ifoldlOf :: forall r b a t s i. IndexedFold (Dual (Endo Function r)) i s t a b -> (i -> r -> a -> r) -> r -> s -> r
Left fold over an IndexedFold
.
#iallOf Source
iallOf :: forall r b a t s i. HeytingAlgebra r => IndexedFold (Conj r) i s t a b -> (i -> a -> r) -> s -> r
Whether all foci of an IndexedFold
satisfy a predicate.
#ianyOf Source
ianyOf :: forall r b a t s i. HeytingAlgebra r => IndexedFold (Disj r) i s t a b -> (i -> a -> r) -> s -> r
Whether any focus of an IndexedFold
satisfies a predicate.
#itraverseOf_ Source
itraverseOf_ :: forall r b a t s f i. Applicative f => IndexedFold (Endo Function (f Unit)) i s t a b -> (i -> a -> f r) -> s -> f Unit
Traverse the foci of an IndexedFold
, discarding the results.
Re-exports from Data.Lens.Types
- Modules
- Data.
Lens - 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. 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