chunked-data-0.3.0: Typeclasses for dealing with various chunked data representations

Safe Haskell | None
Language | Haskell98

Data.ChunkedZip

Description

Various zipping and unzipping functions for chunked data structures.

# Documentation

class Functor f => Zip f where #

Minimal complete definition

zipWith

Methods

zipWith :: (a -> b -> c) -> f a -> f b -> f c #

zip :: f a -> f b -> f (a, b) #

zap :: f (a -> b) -> f a -> f b #

unzip :: f (a, b) -> (f a, f b) #

Instances

Zip [] # |
Methods zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] # zip :: [a] -> [b] -> [(a, b)] # zap :: [a -> b] -> [a] -> [b] # unzip :: [(a, b)] -> ([a], [b]) #
Zip NonEmpty # |
Methods zipWith :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c # zip :: NonEmpty a -> NonEmpty b -> NonEmpty (a, b) # zap :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b # unzip :: NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) #
Zip Tree # |
Methods zipWith :: (a -> b -> c) -> Tree a -> Tree b -> Tree c # zip :: Tree a -> Tree b -> Tree (a, b) # zap :: Tree (a -> b) -> Tree a -> Tree b # unzip :: Tree (a, b) -> (Tree a, Tree b) #
Zip Seq # |
Methods zipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c # zip :: Seq a -> Seq b -> Seq (a, b) # zap :: Seq (a -> b) -> Seq a -> Seq b # unzip :: Seq (a, b) -> (Seq a, Seq b) #
Zip IntMap # |
Methods zipWith :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c # zip :: IntMap a -> IntMap b -> IntMap (a, b) # zap :: IntMap (a -> b) -> IntMap a -> IntMap b # unzip :: IntMap (a, b) -> (IntMap a, IntMap b) #
Zip Vector # |
Methods zipWith :: (a -> b -> c) -> Vector a -> Vector b -> Vector c # zip :: Vector a -> Vector b -> Vector (a, b) # zap :: Vector (a -> b) -> Vector a -> Vector b # unzip :: Vector (a, b) -> (Vector a, Vector b) #
Zip ((->) a) # |
Methods zipWith :: (a -> b -> c) -> (a -> a) -> (a -> b) -> a -> c # zip :: (a -> a) -> (a -> b) -> a -> (a, b) # zap :: (a -> a -> b) -> (a -> a) -> a -> b # unzip :: (a -> (a, b)) -> (a -> a, a -> b) #
Zip m => Zip (IdentityT * m) # |
Methods zipWith :: (a -> b -> c) -> IdentityT * m a -> IdentityT * m b -> IdentityT * m c # zip :: IdentityT * m a -> IdentityT * m b -> IdentityT * m (a, b) # zap :: IdentityT * m (a -> b) -> IdentityT * m a -> IdentityT * m b # unzip :: IdentityT * m (a, b) -> (IdentityT * m a, IdentityT * m b) #
Zip m => Zip (ReaderT * e m) # |
Methods zipWith :: (a -> b -> c) -> ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m c # zip :: ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m (a, b) # zap :: ReaderT * e m (a -> b) -> ReaderT * e m a -> ReaderT * e m b # unzip :: ReaderT * e m (a, b) -> (ReaderT * e m a, ReaderT * e m b) #
(Zip f, Zip g) => Zip (Compose * * f g) # |
Methods zipWith :: (a -> b -> c) -> Compose * * f g a -> Compose * * f g b -> Compose * * f g c # zip :: Compose * * f g a -> Compose * * f g b -> Compose * * f g (a, b) # zap :: Compose * * f g (a -> b) -> Compose * * f g a -> Compose * * f g b # unzip :: Compose * * f g (a, b) -> (Compose * * f g a, Compose * * f g b) #

class Functor f => Zip3 f where #

Minimal complete definition

zipWith3, unzip3

Methods

zipWith3 :: (a -> b -> c -> d) -> f a -> f b -> f c -> f d #

zip3 :: f a -> f b -> f c -> f (a, b, c) #

zap3 :: f (a -> b -> c) -> f a -> f b -> f c #

unzip3 :: f (a, b, c) -> (f a, f b, f c) #

Instances

Zip3 [] # |
Methods zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] # zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] # zap3 :: [a -> b -> c] -> [a] -> [b] -> [c] # unzip3 :: [(a, b, c)] -> ([a], [b], [c]) #
Zip3 Seq # |
Methods zipWith3 :: (a -> b -> c -> d) -> Seq a -> Seq b -> Seq c -> Seq d # zip3 :: Seq a -> Seq b -> Seq c -> Seq (a, b, c) # zap3 :: Seq (a -> b -> c) -> Seq a -> Seq b -> Seq c # unzip3 :: Seq (a, b, c) -> (Seq a, Seq b, Seq c) #
Zip3 Vector # |
Methods zipWith3 :: (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d # zip3 :: Vector a -> Vector b -> Vector c -> Vector (a, b, c) # zap3 :: Vector (a -> b -> c) -> Vector a -> Vector b -> Vector c # unzip3 :: Vector (a, b, c) -> (Vector a, Vector b, Vector c) #

class Functor f => Zip4 f where #

Minimal complete definition

zipWith4, unzip4

Methods

zipWith4 :: (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e #

zip4 :: f a -> f b -> f c -> f d -> f (a, b, c, d) #

zap4 :: f (a -> b -> c -> d) -> f a -> f b -> f c -> f d #

unzip4 :: f (a, b, c, d) -> (f a, f b, f c, f d) #

Instances

Zip4 [] # |
Methods zipWith4 :: (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] # zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)] # zap4 :: [a -> b -> c -> d] -> [a] -> [b] -> [c] -> [d] # unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d]) #
Zip4 Seq # |
Methods zipWith4 :: (a -> b -> c -> d -> e) -> Seq a -> Seq b -> Seq c -> Seq d -> Seq e # zip4 :: Seq a -> Seq b -> Seq c -> Seq d -> Seq (a, b, c, d) # zap4 :: Seq (a -> b -> c -> d) -> Seq a -> Seq b -> Seq c -> Seq d # unzip4 :: Seq (a, b, c, d) -> (Seq a, Seq b, Seq c, Seq d) #
Zip4 Vector # |
Methods zipWith4 :: (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e # zip4 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector (a, b, c, d) # zap4 :: Vector (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d # unzip4 :: Vector (a, b, c, d) -> (Vector a, Vector b, Vector c, Vector d) #

class Functor f => Zip5 f where #

Minimal complete definition

zipWith5, unzip5

Methods

zipWith5 :: (a -> b -> c -> d -> e -> g) -> f a -> f b -> f c -> f d -> f e -> f g #

zip5 :: f a -> f b -> f c -> f d -> f e -> f (a, b, c, d, e) #

zap5 :: f (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e #

unzip5 :: f (a, b, c, d, e) -> (f a, f b, f c, f d, f e) #

Instances

Zip5 [] # |
Methods zipWith5 :: (a -> b -> c -> d -> e -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [g] # zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)] # zap5 :: [a -> b -> c -> d -> e] -> [a] -> [b] -> [c] -> [d] -> [e] # unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e]) #
Zip5 Vector # |
Methods zipWith5 :: (a -> b -> c -> d -> e -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g # zip5 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector (a, b, c, d, e) # zap5 :: Vector (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e # unzip5 :: Vector (a, b, c, d, e) -> (Vector a, Vector b, Vector c, Vector d, Vector e) #

class Functor f => Zip6 f where #

Minimal complete definition

zipWith6, unzip6

Methods

zipWith6 :: (a -> b -> c -> d -> e -> g -> h) -> f a -> f b -> f c -> f d -> f e -> f g -> f h #

zip6 :: f a -> f b -> f c -> f d -> f e -> f g -> f (a, b, c, d, e, g) #

zap6 :: f (a -> b -> c -> d -> e -> g) -> f a -> f b -> f c -> f d -> f e -> f g #

unzip6 :: f (a, b, c, d, e, g) -> (f a, f b, f c, f d, f e, f g) #

Instances

Zip6 [] # |
Methods zipWith6 :: (a -> b -> c -> d -> e -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [g] -> [h] # zip6 :: [a] -> [b] -> [c] -> [d] -> [e] -> [g] -> [(a, b, c, d, e, g)] # zap6 :: [a -> b -> c -> d -> e -> g] -> [a] -> [b] -> [c] -> [d] -> [e] -> [g] # unzip6 :: [(a, b, c, d, e, g)] -> ([a], [b], [c], [d], [e], [g]) #
Zip6 Vector # |
Methods zipWith6 :: (a -> b -> c -> d -> e -> g -> h) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g -> Vector h # zip6 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g -> Vector (a, b, c, d, e, g) # zap6 :: Vector (a -> b -> c -> d -> e -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g # unzip6 :: Vector (a, b, c, d, e, g) -> (Vector a, Vector b, Vector c, Vector d, Vector e, Vector g) #

class Functor f => Zip7 f where #

Minimal complete definition

zipWith7, unzip7

Methods

zipWith7 :: (a -> b -> c -> d -> e -> g -> h -> i) -> f a -> f b -> f c -> f d -> f e -> f g -> f h -> f i #

zip7 :: f a -> f b -> f c -> f d -> f e -> f g -> f h -> f (a, b, c, d, e, g, h) #

zap7 :: f (a -> b -> c -> d -> e -> g -> h) -> f a -> f b -> f c -> f d -> f e -> f g -> f h #

unzip7 :: f (a, b, c, d, e, g, h) -> (f a, f b, f c, f d, f e, f g, f h) #

Instances

Zip7 [] # |
Methods zipWith7 :: (a -> b -> c -> d -> e -> g -> h -> i) -> [a] -> [b] -> [c] -> [d] -> [e] -> [g] -> [h] -> [i] # zip7 :: [a] -> [b] -> [c] -> [d] -> [e] -> [g] -> [h] -> [(a, b, c, d, e, g, h)] # zap7 :: [a -> b -> c -> d -> e -> g -> h] -> [a] -> [b] -> [c] -> [d] -> [e] -> [g] -> [h] # unzip7 :: [(a, b, c, d, e, g, h)] -> ([a], [b], [c], [d], [e], [g], [h]) #