tup-functor-0.2.0.3: Homogeneous tuplesSource codeContentsIndex
Data.Tup.Tup.Class
Contents
the Tup class
misc
zipping
Synopsis
class (Functor f, Applicative f, Foldable f, Traversable f) => Tup f where
tupSize :: f a -> Int
tupToList :: f a -> [a]
tupFromList :: [a] -> f a
tupUndef :: f a -> a
maybeTupFromList :: Tup f => [a] -> Maybe (f a)
transposeTup :: (Tup f, Tup g) => f (g a) -> g (f a)
maybeTupConcat :: (Tup f, Tup g, Tup h) => f a -> g a -> Maybe (h a)
unsafeTupConcat :: (Tup f, Tup g, Tup h) => f a -> g a -> h a
zipTupWith :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
zipTupWith3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
zipTupWith4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e
zipTup :: Applicative f => f a -> f b -> f (a, b)
zipTup3 :: Applicative f => f a -> f b -> f c -> f (a, b, c)
zipTup4 :: Applicative f => f a -> f b -> f c -> f d -> f (a, b, c, d)
the Tup class
class (Functor f, Applicative f, Foldable f, Traversable f) => Tup f whereSource
Methods
tupSize :: f a -> IntSource
tupToList :: f a -> [a]Source
tupFromList :: [a] -> f aSource
tupUndef :: f a -> aSource
show/hide Instances
misc
maybeTupFromList :: Tup f => [a] -> Maybe (f a)Source
Safe version of tupFromList.
transposeTup :: (Tup f, Tup g) => f (g a) -> g (f a)Source
Transpose a Tup of Tups.
maybeTupConcat :: (Tup f, Tup g, Tup h) => f a -> g a -> Maybe (h a)Source
Concatenation
unsafeTupConcat :: (Tup f, Tup g, Tup h) => f a -> g a -> h aSource
zipping
zipTupWith :: Applicative f => (a -> b -> c) -> f a -> f b -> f cSource
zipTupWith3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f dSource
zipTupWith4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f eSource
zipTup :: Applicative f => f a -> f b -> f (a, b)Source
zipTup3 :: Applicative f => f a -> f b -> f c -> f (a, b, c)Source
zipTup4 :: Applicative f => f a -> f b -> f c -> f d -> f (a, b, c, d)Source
Produced by Haddock version 2.6.1