@hackage indexed-traversable0.1.5
FunctorWithIndex, FoldableWithIndex, TraversableWithIndex
Installation
Tested Compilers
Dependencies (5)
- array >=0.3.0.2 && <0.6
- base >=4.18
- containers >=0.6.0.1 && <0.9
- foldable1-classes-compat >=0.1 && <0.2
- transformers >=0.5.6.0 && <0.7 Show all…
Dependents (57)
@hackage/rrb-vector, @hackage/mappings, @hackage/free, @hackage/changeset, @hackage/optics-core, @hackage/heist-emanote, Show all…
Package Flags
base-ge-4-18
(on by default)
base >=4.18 (GHC-9.6)
This package provides three useful generalizations:
class Functor f => FunctorWithIndex i f | f -> i where imap :: (i -> a -> b) -> f a -> f b
class Foldable f => FoldableWithIndex i f | f -> i where ifoldMap :: Monoid m => (i -> a -> m) -> f a -> m
class (FunctorWithIndex i t, FoldableWithIndex i t, Traversable t) => TraversableWithIndex i t | t -> i where itraverse :: Applicative f => (i -> a -> f b) -> t a -> f (t b)
This package contains instances for types in GHC boot libraries. For some additional instances see indexed-traversable-instances.
The keys package provides similar functionality,
but uses (associated) TypeFamilies instead of FunctionalDependencies.