Safe Haskell | Safe-Infered |
---|

- class (Functor f, Applicative 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)
- 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) => Tup f whereSource

tupFromList :: [a] -> f aSource

# 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.

# 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