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

Safe HaskellSafe-Inferred
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.

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

Generalization of outerProduct.