utility-ht-0.0.13: Various small helper functions for Lists, Maybes, Tuples, Functions

Safe HaskellSafe
LanguageHaskell98

Control.Functor.HT

Synopsis

Documentation

void :: Functor f => f a -> f () Source #

map :: Functor f => (a -> b) -> f a -> f b Source #

for :: Functor f => f a -> (a -> b) -> f b Source #

unzip :: Functor f => f (a, b) -> (f a, f b) Source #

Caution: Every pair member has a reference to the argument of unzip. Depending on the consumption pattern this may cause a memory leak. For lists, I think, you should generally prefer unzip.

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

Caution: See unzip.

mapFst :: Functor f => (a -> f c) -> (a, b) -> f (c, b) Source #

mapSnd :: Functor f => (b -> f c) -> (a, b) -> f (a, c) Source #

mapFst3 :: Functor f => (a -> f d) -> (a, b, c) -> f (d, b, c) Source #

mapSnd3 :: Functor f => (b -> f d) -> (a, b, c) -> f (a, d, c) Source #

mapThd3 :: Functor f => (c -> f d) -> (a, b, c) -> f (a, b, d) Source #

outerProduct :: (Functor f, Functor g) => (a -> b -> c) -> f a -> g b -> f (g c) Source #

Generalization of outerProduct.