Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Zipping and aligning of indexed functors.
Synopsis
- class (FunctorWithIndex i f, Semialign f) => SemialignWithIndex i f | f -> i where
- ialignWith :: (i -> These a b -> c) -> f a -> f b -> f c
- class (SemialignWithIndex i f, Zip f) => ZipWithIndex i f | f -> i where
- izipWith :: (i -> a -> b -> c) -> f a -> f b -> f c
Documentation
class (FunctorWithIndex i f, Semialign f) => SemialignWithIndex i f | f -> i where Source #
Indexed version of Semialign
.
Nothing
ialignWith :: (i -> These a b -> c) -> f a -> f b -> f c Source #
Analogous to alignWith
, but also provides an index.
Instances
class (SemialignWithIndex i f, Zip f) => ZipWithIndex i f | f -> i where Source #
Indexed version of Zip
Nothing
izipWith :: (i -> a -> b -> c) -> f a -> f b -> f c Source #
Analogous to zipWith
, but also provides an index.
Instances
ZipWithIndex Int [] Source # | |
Defined in Data.Semialign.Indexed | |
ZipWithIndex Int ZipList Source # | |
ZipWithIndex Int IntMap Source # | |
ZipWithIndex Int Seq Source # | |
ZipWithIndex Int Vector Source # | |
ZipWithIndex () Maybe Source # | |
ZipWithIndex () Identity Source # | |
(Eq k, Hashable k) => ZipWithIndex k (HashMap k) Source # | |
Ord k => ZipWithIndex k (Map k) Source # | |
(ZipWithIndex i f, ZipWithIndex j g) => ZipWithIndex (Either i j) (Product f g) Source # | |
(ZipWithIndex i f, ZipWithIndex j g) => ZipWithIndex (i, j) (Compose f g) Source # | |