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
- 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.
izipWith :: (i -> a -> b -> c) -> f a -> f b -> f c Source #
Analogous to zipWith
, but also provides an index.
Instances
SemialignWithIndex Int [] Source # | |
Defined in Data.Semialign.Indexed | |
SemialignWithIndex Int ZipList Source # | |
SemialignWithIndex Int IntMap Source # | |
SemialignWithIndex Int Seq Source # | |
SemialignWithIndex Int Vector Source # | |
SemialignWithIndex () Maybe Source # | |
SemialignWithIndex () Identity Source # | |
(Eq k, Hashable k) => SemialignWithIndex k (HashMap k) Source # | |
Ord k => SemialignWithIndex k (Map k) Source # | |
(SemialignWithIndex i f, SemialignWithIndex j g) => SemialignWithIndex (Either i j) (Product f g) Source # | |
(SemialignWithIndex i f, SemialignWithIndex j g) => SemialignWithIndex (i, j) (Compose f g) Source # | |