Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Fold1 s a = forall (p :: Type -> Type -> Type). IsFold1 p => Optic' p s a
- class (IsGetter p, IsTraversal1 p) => IsFold1 (p :: Type -> Type -> Type)
- folded1 :: forall (t :: Type -> Type) a. Foldable1 t => Fold1 (t a) a
- unfolded1 :: (s -> (a, Maybe s)) -> Fold1 s a
- fold1ing :: Foldable1 t => (s -> t a) -> Fold1 s a
- foldMap1ing :: (forall m. Semigroup m => (a -> m) -> s -> m) -> Fold1 s a
- backwards :: Fold1 s a -> Fold1 s a
- iterated :: (a -> a) -> Fold1 a a
- repeated :: forall a p. IsFold1 p => Optic' p a a
- foldMap1Of :: Semigroup m => Fold1 s a -> (a -> m) -> s -> m
- foldMap1ByOf :: Fold1 s a -> (r -> r -> r) -> (a -> r) -> s -> r
- foldrMap1Of :: Fold1 s a -> (a -> r) -> (a -> r -> r) -> s -> r
- foldlMap1Of :: Fold1 s a -> (a -> r) -> (r -> a -> r) -> s -> r
- fold1Of :: Semigroup a => Fold1 s a -> s -> a
- fold1ByOf :: Fold1 s a -> (a -> a -> a) -> s -> a
- sequence1Of_ :: Apply f => Fold1 s (f a) -> s -> f ()
- traverse1Of_ :: Apply f => Fold1 s a -> (a -> f r) -> s -> f ()
- for1Of_ :: Apply f => Fold1 s a -> s -> (a -> f r) -> f ()
- toList1Of :: Fold1 s a -> s -> NonEmpty a
- concatOf :: Fold1 s (NonEmpty a) -> s -> NonEmpty a
- concatMapOf :: Fold1 s a -> (a -> NonEmpty r) -> s -> NonEmpty r
- firstOf :: Fold1 s a -> s -> a
- lastOf :: Fold1 s a -> s -> a
- minimumOf :: Ord a => Fold1 s a -> s -> a
- minimumByOf :: Fold1 s a -> (a -> a -> Ordering) -> s -> a
- maximumOf :: Ord a => Fold1 s a -> s -> a
- maximumByOf :: Fold1 s a -> (a -> a -> Ordering) -> s -> a
- newtype Union s a = Union {}
Relevant folds
class (IsGetter p, IsTraversal1 p) => IsFold1 (p :: Type -> Type -> Type) Source #
Instances
(Contravariant f, Apply f, Traversable f) => IsFold1 (OptionalStar f) Source # | |
Defined in Fresnel.Fold1.Internal | |
(Contravariant f, Apply f, Traversable f) => IsFold1 (Star1 f) Source # | |
Defined in Fresnel.Fold1.Internal | |
Semigroup r => IsFold1 (Forget r :: Type -> Type -> Type) Source # | |
Defined in Fresnel.Fold1.Internal | |
(Contravariant f, Applicative f, Traversable f) => IsFold1 (Star f) Source # | |
Defined in Fresnel.Fold1.Internal |
Construction
foldMap1ing :: (forall m. Semigroup m => (a -> m) -> s -> m) -> Fold1 s a Source #
Make a Fold1
by lifting a foldMap1
-like function.
foldMap1ing
foldMap1
=folded1
foldMap1Of
.foldMap1ing
=id
Elimination
foldMap1Of :: Semigroup m => Fold1 s a -> (a -> m) -> s -> m Source #
foldMap1ByOf :: Fold1 s a -> (r -> r -> r) -> (a -> r) -> s -> r Source #
foldrMap1Of :: Fold1 s a -> (a -> r) -> (a -> r -> r) -> s -> r Source #
foldlMap1Of :: Fold1 s a -> (a -> r) -> (r -> a -> r) -> s -> r Source #
sequence1Of_ :: Apply f => Fold1 s (f a) -> s -> f () Source #
traverse1Of_ :: Apply f => Fold1 s a -> (a -> f r) -> s -> f () Source #
minimumByOf :: Fold1 s a -> (a -> a -> Ordering) -> s -> a Source #
maximumByOf :: Fold1 s a -> (a -> a -> Ordering) -> s -> a Source #