Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- module Optics.IxTraversal
- module Optics.IxFold
- module Optics.IxSetter
- class Functor f => FunctorWithIndex i f | f -> i where
- class (FunctorWithIndex i f, Foldable f) => FoldableWithIndex i f | f -> i where
- itraverse_ :: (FoldableWithIndex i t, Applicative f) => (i -> a -> f b) -> t a -> f ()
- ifor_ :: (FoldableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f ()
- class (FoldableWithIndex i t, Traversable t) => TraversableWithIndex i t | t -> i where
- ifor :: (TraversableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f (t b)
Indexed optics
module Optics.IxTraversal
module Optics.IxFold
module Optics.IxSetter
Functors with index
class Functor f => FunctorWithIndex i f | f -> i where #
imap :: (i -> a -> b) -> f a -> f b #
imap :: TraversableWithIndex i f => (i -> a -> b) -> f a -> f b #
Instances
Foldable with index
class (FunctorWithIndex i f, Foldable f) => FoldableWithIndex i f | f -> i where #
ifoldMap :: Monoid m => (i -> a -> m) -> f a -> m #
ifoldMap :: (TraversableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m #
Instances
itraverse_ :: (FoldableWithIndex i t, Applicative f) => (i -> a -> f b) -> t a -> f () #
Traverse FoldableWithIndex
ignoring the results.
ifor_ :: (FoldableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f () #
Flipped itraverse_
.
Traversable with index
class (FoldableWithIndex i t, Traversable t) => TraversableWithIndex i t | t -> i where #
itraverse :: Applicative f => (i -> a -> f b) -> t a -> f (t b) #
Instances
ifor :: (TraversableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f (t b) #
Flipped itraverse