Hoogle Search
Within LTS Haskell 24.35 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
foldMapOf :: Getting r s a -> (a -> r) -> s -> rdiagrams-lib Diagrams.Prelude Map each part of a structure viewed through a Lens, Getter, Fold or Traversal to a monoid and combine the results.
>>> foldMapOf (folded . both . _Just) Sum [(Just 21, Just 21)] Sum {getSum = 42}foldMap = foldMapOf folded
foldMapOf ≡ views ifoldMapOf l = foldMapOf l . Indexed
foldMapOf :: Getter s a -> (a -> r) -> s -> r foldMapOf :: Monoid r => Fold s a -> (a -> r) -> s -> r foldMapOf :: Semigroup r => Fold1 s a -> (a -> r) -> s -> r foldMapOf :: Lens' s a -> (a -> r) -> s -> r foldMapOf :: Iso' s a -> (a -> r) -> s -> r foldMapOf :: Monoid r => Traversal' s a -> (a -> r) -> s -> r foldMapOf :: Semigroup r => Traversal1' s a -> (a -> r) -> s -> r foldMapOf :: Monoid r => Prism' s a -> (a -> r) -> s -> r
foldMapOf :: Getting r s a -> (a -> r) -> s -> r
iconcatMap :: FoldableWithIndex i f => (i -> a -> [b]) -> f a -> [b]diagrams-lib Diagrams.Prelude Concatenate the results of a function of the elements of an indexed container with access to the index. When you don't need access to the index then concatMap is more flexible in what it accepts.
concatMap ≡ iconcatMap . const iconcatMap ≡ ifoldMap
iconcatMapOf :: IndexedGetting i [r] s a -> (i -> a -> [r]) -> s -> [r]diagrams-lib Diagrams.Prelude Concatenate the results of a function of the elements of an IndexedFold or IndexedTraversal with access to the index. When you don't need access to the index then concatMapOf is more flexible in what it accepts.
concatMapOf l ≡ iconcatMapOf l . const iconcatMapOf ≡ ifoldMapOf
iconcatMapOf :: IndexedGetter i s a -> (i -> a -> [r]) -> s -> [r] iconcatMapOf :: IndexedFold i s a -> (i -> a -> [r]) -> s -> [r] iconcatMapOf :: IndexedLens' i s a -> (i -> a -> [r]) -> s -> [r] iconcatMapOf :: IndexedTraversal' i s a -> (i -> a -> [r]) -> s -> [r]
ifoldMap :: (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> mdiagrams-lib Diagrams.Prelude Fold a container by mapping value to an arbitrary Monoid with access to the index i. When you don't need access to the index then foldMap is more flexible in what it accepts.
foldMap ≡ ifoldMap . const
ifoldMap' :: (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> mdiagrams-lib Diagrams.Prelude A variant of ifoldMap that is strict in the accumulator. When you don't need access to the index then foldMap' is more flexible in what it accepts.
foldMap' ≡ ifoldMap' . const
ifoldMapBy :: FoldableWithIndex i t => (r -> r -> r) -> r -> (i -> a -> r) -> t a -> rdiagrams-lib Diagrams.Prelude No documentation available.
ifoldMapByOf :: IndexedFold i t a -> (r -> r -> r) -> r -> (i -> a -> r) -> t -> rdiagrams-lib Diagrams.Prelude No documentation available.
ifoldMapOf :: IndexedGetting i m s a -> (i -> a -> m) -> s -> mdiagrams-lib Diagrams.Prelude Fold an IndexedFold or IndexedTraversal by mapping indices and values to an arbitrary Monoid with access to the i. When you don't need access to the index then foldMapOf is more flexible in what it accepts.
foldMapOf l ≡ ifoldMapOf l . const
ifoldMapOf :: IndexedGetter i s a -> (i -> a -> m) -> s -> m ifoldMapOf :: Monoid m => IndexedFold i s a -> (i -> a -> m) -> s -> m ifoldMapOf :: IndexedLens' i s a -> (i -> a -> m) -> s -> m ifoldMapOf :: Monoid m => IndexedTraversal' i s a -> (i -> a -> m) -> s -> m
imap :: FunctorWithIndex i f => (i -> a -> b) -> f a -> f bdiagrams-lib Diagrams.Prelude Map with access to the index.
imapAccumL :: TraversableWithIndex i t => (i -> s -> a -> (s, b)) -> s -> t a -> (s, t b)diagrams-lib Diagrams.Prelude Generalizes mapAccumL to add access to the index. imapAccumL accumulates state from left to right.
mapAccumL ≡ imapAccumL . const