Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | GHC2021 |
Some helper utils for Lens
Synopsis
- folding1 :: Foldable1 f => (s -> f a) -> Fold1 s a
- ifolding1 :: (Foldable1 f, Indexable i p, Contravariant g, Apply g) => (s -> f (i, a)) -> Over p g s t a b
- itoNonEmptyOf :: IndexedGetting i (NonEmptyDList (i, a)) s a -> s -> NonEmpty (i, a)
Documentation
folding1 :: Foldable1 f => (s -> f a) -> Fold1 s a Source #
construct a Fold1 from a function that produces a Foldable1
ifolding1 :: (Foldable1 f, Indexable i p, Contravariant g, Apply g) => (s -> f (i, a)) -> Over p g s t a b Source #
Version of ifolding to build an IndexedFold1
itoNonEmptyOf :: IndexedGetting i (NonEmptyDList (i, a)) s a -> s -> NonEmpty (i, a) Source #
indexed version of toNonEmptyOf